Hi folks, I re-run my benchmarks with the latest and greatest from Mahout Math, fastutil, HPPC and Trove. Mind you these results will vary depending on the CPU, architecture, JVM version etc... so no flame wars. If you want to repeat them in your own setting then:
git clone [email protected]:carrotsearch/hppc.git cd hppc mvn package cd hppc-benchmarks/target/hppc-benchmarks-0.6.0-SNAPSHOT java -jar hppc-benchmarks-0.6.0-SNAPSHOT.jar The results show what we already established once -- HPPC and fastutil are typically faster and more "stable" with regard to input type. I think these are due to murmur hashing being applied to keys and linear, instead of quadratic, probing. 1) Simple bigram counting (Polish texts). {code} ================================================================================ ------------------------ BenchmarkBigramCounting (1/1) ------------------------- ================================================================================ library ms linear runtime HPPC 67.3 ================= TROVE 99.1 ========================= FASTUTIL_OPEN 52.3 ============= FASTUTIL_LINKED 48.2 ============ MAHOUT 118.3 ============================== {code} 2) contains() with removed entries. {code} ================================================================================ ---------------------- BenchmarkContainsWithRemoved (1/1) ---------------------- ================================================================================ %removedKeys implementation ms linear runtime 0 HPPC 43.55 ========= 0 FASTUTIL 43.08 ========= 0 JAVA 110.80 ========================= 0 TROVE 85.32 =================== 0 MAHOUT 94.36 ===================== 0.25 HPPC 46.27 ========== 0.25 FASTUTIL 44.21 ========== 0.25 JAVA 113.25 ========================= 0.25 TROVE 116.77 ========================== 0.25 MAHOUT 116.16 ========================== 0.5 HPPC 45.85 ========== 0.5 FASTUTIL 43.75 ========= 0.5 JAVA 97.21 ====================== 0.5 TROVE 85.82 =================== 0.5 MAHOUT 131.44 ============================== 0.75 HPPC 31.92 ======= 0.75 FASTUTIL 33.57 ======= 0.75 JAVA 71.20 ================ 0.75 TROVE 70.73 ================ 0.75 MAHOUT 77.89 ================= 1 HPPC 7.97 = 1 FASTUTIL 9.39 == 1 JAVA 31.38 ======= 1 TROVE 6.31 = 1 MAHOUT 12.90 == {code} 3) put() with different input distributions. {code} ================================================================================ ------------------------------ BenchmarkPut (1/1) ------------------------------ ================================================================================ distribution implementation ms linear runtime RANDOM HPPC 46.6 ======= RANDOM FASTUTIL 47.1 ======= RANDOM JAVA 181.8 ============================== RANDOM TROVE 78.4 ============ RANDOM MAHOUT 61.8 ========== LINEAR HPPC 46.7 ======= LINEAR FASTUTIL 47.2 ======= LINEAR JAVA 30.5 ===== LINEAR TROVE 15.9 == LINEAR MAHOUT 20.9 === HIGHBITS HPPC 46.7 ======= HIGHBITS FASTUTIL 47.2 ======= HIGHBITS JAVA 142.7 ======================= HIGHBITS TROVE 60.3 ========= HIGHBITS MAHOUT 55.0 ========= {code} Cheers, Dawid
