5 ms·
> I don't think it's even close. Benchmark game is one (biased) reference. I agree. 1. Benchmarks tend to do one thing, then repeat that one thing 25000 times
by lelanthran 3y ago
> I don't think it's even close. Benchmark game is one (biased) reference.
I agree.
1. Benchmarks tend to do one thing, then repeat that one thing 25000 times. Non-server programs don't do that[1] so you don't get to amortise the time spent on JITting a code snippet across 25000 executions.
2. The runtime basically requires exclusive use of a core for short periods (GC, JIT). If you're running on a system that costs per core, you're using (worst case scenario) an extra core for each Java program. The benchmarks happily give multiple cores even to sequential (non-parallel) benchmarks.
[1] Even many server programs don't do that.
- igouy 3y ago1. The benchmarks game doesn't "repeat that one thing 25000 times" as warmup and the benchmarks game measurements include startup time: https://benchmarksgame-team.pages.debian.net/benchmarksgame/sometimes-people-just-make-up-stuff.html#jvm-startup-time https://benchmarksgame-team.pages.debian.net/benchmarksgame/... 2. The benchmarks game happily gives multiple cores and shows that "cpu secs" measurement: https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/java.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...