3 ms·
I would certainly hope Rust is much faster! But Java is a very quick language after it's optimizing native compiler kicks in. Speaking of, one thing that bothe
by exabrial 5y ago
I would certainly hope Rust is much faster! But Java is a very quick language after it's optimizing native compiler kicks in.
Speaking of, one thing that bothers me about nearly every Java benchmark ever, is nobody checks to see what was _actually_ compiled to native code. To really compare Apples and Oranges, was the code being executed in interpreted mode? What about compiling with Graal? These questions are important for any long-lived program (which most Java programs are).
Here, the warmup iteration of "2" and limit of "5" test runs doesn't really accomplish anything. Depending on the JDK the default compilation threshold is 1.5k or 10k IIRC.
- Zababa 5y ago> These questions are important for any long-lived program (which most Java programs are). Is this still true in the world of CI/CD? If you're following "best practices" and doing multiple deployments a day, how much will your performance suffer? I don't have any answers to that, though I suspect that it may be one of the reasons why Go is used so much for "cloud stuff".
- pjmlp 5y agoIf you are doing it properly, JIT caches should be used.
- exabrial 5y ago> Long running 1500 or 10k in production for hot methods should only take a few mins in most production code I'd hope. Workload dependent, of course! And, you can always tune the JDK for your workload. An optimizing compiler is a very powerful tool