Adding JMH Benchmarks

Make LogoRRR fast again.

Release 24.3.0 contains JMH benchmarking facilities for LogoRRR.

JMH is THE benchmarking tool for JVM applications, and LogoRRR benefits from this framework as well. There are some performance sensistive parts in the application, some of which were measured by this framework and subsequently improved for the 24.3.0 release.

Following the instructions on the project homepage, it is easy to bootstrap an test environment using the provided standard maven archetype.

LogoRRR is written in Scala, but uses maven as it’s build tool, which I think is not so common. For the time being this will stay like it is - for the JMH benchmarks it turned out to be an advantage since the setup was very easy.

A drawback is that currently the Benchmarks themselves have to be implemented in Java, but one can easily create APIs in the Scala code base which serve as entry points.

Currently, LogoRRR is quite fast in my opinion, but there is always room for performance improvements. Specifically, I tried my luck in enhancing operations which are called many times - million times during a typical run.

(Not so) long story short, my assumptions about the performance characteristics of the specific function turned out to be dead wrong. JMH helped me to more than double the throughput of a function, which was quite satisfying.

Tools like JMH will show you what really works, and provide reproducible results. 🤷🏼‍♂️🚀

On the other hand, LogoRRR is already with the current release capable of handling large files, this will only get better in the future. 🏗️

Image provided by Nathan Salt