Hi, I've created a following JIRA task, to add JMH dependency and allow execution of microbenchmarks based on JMH framework. I've added maven profile to separate compilation of benchmark related jar from the main stream. My proposed changes attached to the JIRA issue, any comments or suggestions are welcomed.
Also it will be interesting to hear ideas where to actually write and implement the benchmarks once such change will be added. Moreover it's important to note, that using JMH it only allows to compare algorithms and different implementations performance wise rather than comparing the actually accuracy of result produced. For example if I'll add a benchmark to compare different random source providers, I will receive results which show me what is the most performant provider for given workload, while nothing regarding the actually accuracy of the algorithm I've implemented to run the comparison. More particularly I've added a benchmark to estimate value of PI add this is the results I've got out of JMH: # Run complete. Total time: 00:01:35 Benchmark (pairsToGenerate) (randomSourceName) Mode Cnt Score Error Units PiComputationBenchmark.computePi 1000000 JDK avgt 5 44076.310 ± 2794.888 us/op PiComputationBenchmark.computePi 1000000 WELL_512_A avgt 5 19374.112 ± 4973.542 us/op PiComputationBenchmark.computePi 1000000 WELL_1024_A avgt 5 20575.240 ± 4298.444 us/op PiComputationBenchmark.computePi 1000000 WELL_19937_A avgt 5 42208.136 ± 2062.648 us/op PiComputationBenchmark.computePi 1000000 WELL_19937_C avgt 5 45105.231 ± 2752.918 us/op PiComputationBenchmark.computePi 1000000 WELL_44497_A avgt 5 49710.663 ± 15786.830 us/op PiComputationBenchmark.computePi 1000000 WELL_44497_B avgt 5 48984.700 ± 2449.719 us/op PiComputationBenchmark.computePi 1000000 MT avgt 5 22466.565 ± 1377.585 us/op PiComputationBenchmark.computePi 1000000 ISAAC avgt 5 21615.283 ± 1080.331 us/op Note, there is nothing here that shows how actually computed PI results is close to real value. Best regards, Artem Barger.