The HashSet in the Hot Spot

time to read 1 min | 145 words

The title of this post reminds me of a Bones episode. This blog post is actually from an internal mail made by Federico Lois, as part of bigger perf work.


Here is the calling code, note that this is typically called many times, and _pageStates is a HashSet<PagerState>.


The following change was made:


And here are the results:


That is 230% improvement! I can identify with the sentiment.