logoalt Hacker News

xmcqdpt2 • today at 12:22 PM • 1 reply • view on HN

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.)


Replies

marginalia_nu • today at 12:46 PM

Yeah the motiation for the port is still mostly ergonomics. Like it's worth it for std::span, <algorithm>, and TSan alone.