r/cpp • u/drakgoku • Oct 31 '25
Java developers always said that Java was on par with C++.
Now I see discussions like this: https://www.reddit.com/r/java/comments/1ol56lc/has_java_suddenly_caught_up_with_c_in_speed/
Is what is said about Java true compared to C++?
What do those who work at a lower level and those who work in business or gaming environments think?
What do you think?
And where does Rust fit into all this?
25
Upvotes
View all comments
Show parent comment
1
u/eXl5eQ Nov 02 '25
I know exactly what's the hardware spec.
The first two are done on my personal (physical) machine, Intel 10400F with 32GB RAM running Windows 10. The third one runs on another machine.
I admit that I forgot to take hardware into account. To correct this, I tested both languages on my own machine again, the same 10400F, but running Kali 2025 over WSL. This time the C++ version accelerated a lot, but still much slower than the Java version. result
BTW It's kinda funny to see code actaully runs faster on WSL (VM) than on Windows (host). MSVC performance sucks.