+ All Categories
Home > Documents > Performancebury Tales

Performancebury Tales

Date post: 02-Jan-2016
Category:
Upload: ivana-cummings
View: 25 times
Download: 0 times
Share this document with a friend
Description:
Performancebury Tales. Sisyphus. Performance is hard. Sisyphus. You cannot stop. Sisyphus. ..but. Sisyphus. It’s NOT useless. Samsara. Samsara. Non-synchronized access to shared System.Collections.Hashtable System.Collections.Generic.Dictionary - PowerPoint PPT Presentation
Popular Tags:
16
Performancebury Tales
Transcript
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 15: Performancebury Tales

Narcissus

Enum.ToString() can be 85% faster

How to implement QuickToString:http://der-waldgeist.blogspot.com/2010/08/3-enumtostring.html

Page 16: Performancebury Tales

Ask me!

• Alexey Nedilko• [email protected]• skype:alexey.nedilko


Recommended