To do high-throughput transaction processing involving a mix of strings and numerical operations I'm pretty sure nothing actually beats Java, not even C++.
Numerical computing is a different thing. Low-latency audio as well, etc.
It's really, really easy to beat Java at string processing. UTF-16 + immutable strings is not a recipe for performance. The UTF-16 in particular is quite killer - it basically means you have ~half the memory bandwidth in many, many workloads, and the JIT & GC can't do anything about it (other than use up even more of your already limited memory bandwidth, that is)
As for "numerical operations" - what about Java makes you think it's at all particularly good at it? Especially once boxing enters the picture because you're using an ArrayList or whatever, and simple numbers become crazy heap allocations that triple their size.
Yes, if you want to write a loop doing a single type of processing, numerical or string, you can typically write better code in C++, or a shader language.
Most business applications don't follow that pattern at all. It's a mix of many types of operations. Look at the Techempower benchmarks, for example; the Java frameworks tend to do better than the C++ ones, at least when it comes to throughput (C++ is more competitive when it comes to latency).
I believe it's due to the HotSpot compiler doing aggressive, profile-guided optimization (you can do AOT profile-guided optimization but few people actually do it; in Java you get that automatically) as well as the garbage collector. Memory allocation is a fast as incrementing a pointer. Whereas C++ will tend to do way more housekeeping; in Java that housekeeping is amortized when you call the GC. That hurts latency but helps throughput.
If your workload is heavy memory allocation churn then yes Java will absolutely be a better fit, or really any language with a good GC. But that's not "string & numerical" processing.
As for Techempower the top framework by a landslide is in Rust, not Java. That's a matter of if the framework is optimized to win at Techempower or not, wasn't that the lesson actix taught everyone?
To do high-throughput transaction processing involving a mix of strings and numerical operations I'm pretty sure nothing actually beats Java, not even C++.
Numerical computing is a different thing. Low-latency audio as well, etc.