PalDB
PalDB copied to clipboard
Improve throughput benchmarks
- Use JMH
- Create less garbage; don't invoke expensive
Integer.toString()
in the tight loop. Simple profiling shows that significant portion of benchmark time is spent inInteger.toString()
; hence benchmarks results are "shifted" and could make wrong impression on the actual performance difference between the benchmarked stores. Creating garbage makes garbage collection to kick in unpredictably during benchmarking, that makes results less representative as well.