Java Microbenchmarks with JMH, Part 3
In Part 1 of this series, we covered the basics of creating a JMH project and getting it to run, proposed a small benchmark, and showed what the implementation would look like. In Part 2, we looked at how to configure JMH, how it works, and why certain parameters are necessary. In this last part, we'll focus on how not to write a benchmark for JMH and why some precautions are necessary. This may be the most important part of the three, as it'll give you insights into some quirks of the JVM.