I'm no JMH expert... but, there is a lot more going on there than just
iterations to avoid the extra time for JIT compilation on warmup.
Checkout https://shipilev.net/talks/devoxx-Nov2013-benchmarking.pdf
for an idea of the kinds of problems naive timer-only benchmarks
encounter, and the different
Actually, I would disagree. First, I don’t think the first thousand or slow
iterations running slow would matter much with 1.5 million iterations. Lets say
the first thousand take 10 times longer the the rest of the iterations. That is
still only the equivalent of 10,000 iterations. That is a bl
What I mean is that JMH is written to avoid including
behind-the-scenes variability of the code execution that changes from
startup until the code has been compiled to native code, garbage
collection, synchronization points for threads (safe points), etc. All
these things become variable noise that