News for hackers. Stuff that matters.
Re:Overhead of Returning Optional Values in Java and Rust by exabrial on Saturday October 16, 2021 @08:03PM (#28892734)
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.

Re:Overhead of Returning Optional Values in Java and Rust by Zababa on Saturday October 16, 2021 @08:57PM (#28893036)
> 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".

Re:Overhead of Returning Optional Values in Java and Rust by exabrial on Sunday October 17, 2021 @02:09PM (#28898415)
> 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

Re:Overhead of Returning Optional Values in Java and Rust by pjmlp on Sunday October 17, 2021 @02:18AM (#28894378)
If you are doing it properly, JIT caches should be used.