Hacker News new | ask | show | jobs
by floxy 583 days 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/...

...where it looks like GCC C++ beats GraalVM in all the tests.

1 comments

Do they compare the second run of Java? Because using GraalVM native image does not really benefit from runtime info and optimization.
Various things.

3,000th run of Java HotSpot.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

I 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.