Summary
In this chapter, you have learned about the JMH tool and were able to use it for your applications. You have learned how to create and run a benchmark, how to set the benchmark parameters, and how to install IDE plugins if needed. We have also provided practical recommendations and references for further reading.
Now you are able to not only measure the average execution time of an application and other performance values (such as throughput, for example) but to do it in a controlled manner—with or without JVM optimizations, warm-up runs, and so on.
In the next chapter, you will learn useful practices for designing and writing application code. We will talk about Java idioms, their implementation and usage, and provide recommendations for implementing equals()
, hashCode()
, compareTo()
, and clone()
methods. We will also discuss the difference between the usage of the StringBuffer
and StringBuilder...