3 ms·
Your upper limit (1000000) needs to come from runtime (user input/file), otherwise you could create a C++ template program to compute the answer at compile time
by floxy 2y ago
Your upper limit (1000000) needs to come from runtime (user input/file), otherwise you could create a C++ template program to compute the answer at compile time. Also, you might be interested in the Benchmarks Game:
https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/gpp-graalvm.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
...where it looks like GCC C++ beats GraalVM in all the tests.
- Osiris-Team 2y agoDo they compare the second run of Java? Because using GraalVM native image does not really benefit from runtime info and optimization.
- floxy 2y agoI know there was a lot of teeth gnashing in the past about HotSpot warmup, and I think it mostly boiled down to not much of a difference for most tests.
- igouy 2y agoFastest JMH after startup & warmup https://benchmarksgame-team.pages.debian.net/benchmarksgame/sometimes-people-just-make-up-stuff.html#jvm-startup-time https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- igouy 2y agoVarious things. 3,000th run of Java HotSpot. https://benchmarksgame-team.pages.debian.net/benchmarksgame/performance/startup.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...