Search code examples
c#.netperformancebig-omemory-footprint

In .NET (C#) is there any place/wiki/book where you can find runtime/cost/memory footprint analysis?


So, I've been using the .NET framework for a little while now. There have been many times when I'm calling some static function or an instance method of List<> where I wonder what the relative performance cost of these operations are. In this case, I was wondering how terrible the static method Enum.GetValues() is. Is there any place where I can figure out relatively the run time of a .NET operation? If not, how do you know which methods can safely be called often and which ones you should avoid? Will I just have to test every method with a timer (please God no..)? Or is this something I'm being overly concerned about?

Thanks in advance.


Solution

  • There are a lot of variables (no pun intended) when looking at performance. I found the best way is to simply profile my own applications using third-party software. That gives me an idea of memory usage and efficiency but mainly for my needs in my environment.

    Here are a couple (most have trials):

    Ants Performance Profiler by redgate

    JustTrace by Telerik

    dotTrace by JetBrains

    dotMemory by JetBrains