performancebury tales
TRANSCRIPT
Performancebury Tales
Sisyphus
Performance is
hard
Sisyphus
Youcannot
stop
Sisyphus
..but..
Sisyphus
It’sNOT
useless
Samsara
SamsaraNon-synchronized access to shared• System.Collections.Hashtable• System.Collections.Generic.Dictionary<>• System.Collections.Generic.Hashset<>
Samsara
The Noble Eightfold Path
• Do not forget to lock shared hastables!
• Do not forget to lock shared hastables!• Do not forget to lock shared hastables!
• Do not forget to lock shared hastables!
• Do not forget to lock shared hastables!
• Do not forget to lock shared hastables!
• Do not forget to lock shared hastables!
• Do not forget to lock shared hastables!
Lernaean Hydra
Lernaean Hydra
System.Diagnostics.Debug
The 300 Spartans
The 300 SpartansOutbound connections
Narcissus
Narcissus
Compiled expressions
Creation method Time, ms (1 mln iterations)
Activator.CreateInstance 1508
Compiled Expression 33
Constructor 25
Narcissus
Enum.ToString() can be 85% faster
How to implement QuickToString:http://der-waldgeist.blogspot.com/2010/08/3-enumtostring.html