> 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: http://builds.carrot2.org/browse/HPPC-BENCHMARK-19/artifact/Benchmarks-Report/com.carrotsearch.hppc.IntArrayListBenchmark.methods.html Dawid --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
