Building up in the JMH
Creating strong microbenchmarks is not easy. It takes time and effort to create the right kind of tools that help in creating the right application. The important thing is to understand, since most processors and JVMs have their own exterior optimization tools, it can be difficult to actually benchmark the performance of a code element in complete isolation to the rest of the program or the processing resources.
Microbenchmarks that are poorly designed fail to perform their actual task, which is to compare different code and produce a winning answer. The JMH provides all the options, especially in the new JVM 9, but the ideal use depends on the abilities of the programmer to identify instances where they need to compare ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access