Demonstration of JMH and micro-optimisations that can be used on a simple routine. but which can save a small amount of time.
For the write-up, see https://alblue.bandlem.com/2020/02/16/class-getname.html
There is an older write-up at
was written prior to the indification of
StringBuilder, and the performance may
differ from the original write-up. Results are included below.
To run the tests, use Maven to build the
benchmarks.jar file, and execute it
with the JMH test runner:
$ mvn package $ java -jar target/benchmarks.jar -bm avgt -tu ns -prof gc