.Net Performance pointers

14 במרץ 2008

אין תגובות

After going this week to the Microsoft performance open house, here are few things to consider:


  • Create performance counters of your own to measure various statistics.

  • Try to avoid using interfaces and virtual methods to supports inlining.

  • If you use a "Contains" method on a collection of structs, be sure to override the "Equals" method, since the default Object.Eqauls method used boxing twice – once for the parameter and the once for "this".

  • Similarly, you should override the GetHashCode methods for structs, since the default implementation for a struct is very inefficient.

  • Use Perfmon.exe to monitor the "% time in GC" – a high value may indicate mid-life crisis.

הוסף תגובה
facebook linkedin twitter email

כתיבת תגובה

האימייל לא יוצג באתר. שדות החובה מסומנים *