Sitemap
Mar 17, 2025

About Java benchmark: I see no description of how did you measure benchmark run time, but from code I guess that you just did ran it from command line. The problem with this approach is that you're running "cold" JVM, so it spends sensible amount of time "warming up", i.e. compiling hot paths and optimizing. To see the difference you can move code from "main()" to separate function and call it from "main()" few times. Subsequent calls will be sensibly faster.

--

--

Sergiy Yevtushenko
Sergiy Yevtushenko

Written by Sergiy Yevtushenko

Writing code for 35+ years and still enjoy it…