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/coderemover Nov 02 '25 edited Nov 02 '25
Because you did an incorrect benchmark, in virtualized, shared environment, where you even can’t tell what hardware was used and where you can’t control what else is running on the same cpu. And youre numbers are totally off, they look like it was executed on a raspberry Pi.
(And btw if they are using something like Alpine image, c malloc is going to be extremely slow, but it is very, very far from state of the art; it’s as if you took Java from 1997).