4 ms·
YMMV but I find Java perf less even with the JIT than OcAml/F# .NET/etc for tuned code which generally is what matters when performance is a concern. The auto-b
by throw234234234 1y ago
YMMV but I find Java perf less even with the JIT than OcAml/F# .NET/etc for tuned code which generally is what matters when performance is a concern. The auto-boxing, lack of proper generics, etc really make it hard to do re-use in a performant way especially around math like apps, especially if they use any of the "Big" boxing types. There's too much heap allocation you can't avoid. Better than say Node/Python but even F# in .NET will generally do better here in my testing with inline templating/stack types/spans/etc.
Languages with immutability/lazy seq/etc support built in can be tuned faster than a library (compiler help around sequences/streams rather than pure library based ones), and again the lack of stack types can make some of these immutable collections much slower/take up more memory than other language targets. There's algorithms I can't use in Java which I can use in .NET/Rust/C++/etc without memory penalty or lots of unsafe/hacky code.