16
Performancebury Tales

Performancebury Tales

Embed Size (px)

Citation preview

Page 1: Performancebury Tales

Performancebury Tales

Page 2: Performancebury Tales

Sisyphus

Performance is

hard

Page 3: Performancebury Tales

Sisyphus

Youcannot

stop

Page 4: Performancebury Tales

Sisyphus

..but..

Page 5: Performancebury Tales

Sisyphus

It’sNOT

useless

Page 6: Performancebury Tales

Samsara

Page 7: Performancebury Tales

SamsaraNon-synchronized access to shared• System.Collections.Hashtable• System.Collections.Generic.Dictionary<>• System.Collections.Generic.Hashset<>

Page 8: Performancebury Tales

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!

Page 9: Performancebury Tales

Lernaean Hydra

Page 10: Performancebury Tales

Lernaean Hydra

System.Diagnostics.Debug

Page 11: Performancebury Tales

The 300 Spartans

Page 12: Performancebury Tales

The 300 SpartansOutbound connections

Page 13: Performancebury Tales

Narcissus

Page 14: Performancebury Tales

Narcissus

Compiled expressions

Creation method Time, ms (1 mln iterations)

Activator.CreateInstance 1508

Compiled Expression 33

Constructor 25

Page 16: Performancebury Tales

Ask me!

• Alexey Nedilko

[email protected]

• skype:alexey.nedilko