I am looking for methods to improve the performance of a C # / application. NET What I have found so far
Assembly.LoadFrom()
What other tools / tips / good practices do you need to get in order to get the best performance from your C # /. NET program.
ngen. . . "CLR #, ".
, . Red-Gate Ants, . , .
, , , .NET Framework. , - Asp.Net, 30 + .
, .
public static class Expensive { private static readonly ConcurrentDictionary<int, int> _map = new ConcurrentDictionary<int, int>(); public static int Calculate(int n) { return _map.AddOrUpdate(n, Add, (key, value) => value); } static int Add(int key) { return 0; } }
ngen, , DLL. , . , x86 x64. , JIT.
ngen
, . , -, db, . /, , XmlDocument Xml CLP ThreadPool , IDisposable, ...
I once rewrote the code for several days to speed up the application, when in fact I discovered that CompareTothere was a bottleneck in my implementation that was called up thousands of times.
CompareTo