|
|
|
|
|
by fluffything
2214 days ago
|
|
The claim is probably that idiomatic code in one case is faster than idiomatic code in the other, not that you can't write C++ code that isn't equally fast. For example, if you use `std::vector` or `std::unique_ptr` you would be deallocating memory when those go out of scope. The JVM might actually never do that, e.g., if the program terminates before sufficient memory pressure arises. Writing Rust code that leaks a `std::vector` is trivial, but doing the same in C++ actually requires some skill. |
|