Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

The HashSet in the Hot Spot

DZone 's Guide to

The HashSet in the Hot Spot

Here's a quick way to get some extra efficiency out of your PagerState.

· Database Zone ·
Free Resource

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.

Topics:
internal ,performance ,mail ,post ,purpose ,nature ,work ,distribution ,blog ,hot

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}