A C++ tool called java-version reads the Java installation's release file directly instead of spawning a java -version process, reducing version lookup time from ~20ms to under 1ms (21x faster). The implementation uses C++17 filesystem APIs to locate and parse the release file in the Java installation directory. Benchmarks using hyperfine on an M5 MacBook Pro confirm the speedup.

4m read timeFrom mostlynerdless.de
Post cover image
Table of contents
Basic IdeaImplementationUsageBenchmarksConclusionAuthorRelated Posts:

Sort: