That’s been my experience too.
At $work we’ve often gotten performance improvements from rewriting C++ code into Java. Every time it’s because rewriting code from Java to C++ requires deeply thinking about the code, which unlocks algorithmic improvements that could be ported back to the C++ version (usually we make those rewrites for other reasons than performance so we don’t actually do that.)
Yeah the motiation for the port is still mostly ergonomics. Like it's worth it for std::span, <algorithm>, and TSan alone.