lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dawid Weiss <>
Subject Re: HPPC: High Performance Primitive Collections for Java
Date Wed, 21 Apr 2010 11:45:22 GMT
> I believe the big part of the speedup is due to HPPC's ability to
> mutate Map values inplace, doing a single key lookup instead of two?

I had great expectations from doing a single lookup instead of two,
but it turns out that it is of very small practical gain (due to
primed cpu caches, I believe). The big gain is in the hash function --
HPPC uses murmur hash for everything, including primitive types (ints,
longs). With open hashing this yields drastic reduction of the number
of collisions -- that's why you get poor performance from other
packages, but not from Java's HashMap, which uses bucket hashing
(hash, then linked list).

There are other things that are surprising and that I'm trying to
figure out how to utilize. For example loops are interesting, small
anonymous classes tend to be inlined and result in excellent
performance as shown here:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message