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.

image004

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

image002

The following change was made:

image003

And here are the results:

image001

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