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

RavenDB vs MongoDB: Which is Better? This White Paper compares the two leading NoSQL Document Databases on 9 features to find out which is the best solution for your next project.  

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.

Do you pay to use your database? What if your database paid you? Learn more with RavenDB.

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 }}