> Rust programmers tend to do all kinds of little hacks here and there to make the borrow checker happy. It can add up. The borrow checker is perfectly happy when you copy everything.
What you say definitely doesn't match my experience.
I would say Java code and Rust code are roughly in the same order of processing speed but the JVM "wastes" some memory. You also have garbage collection complicating performance in some scenarios.
I'm pretty sure you can get in the same processing speed ballpark with careful programming in both languages.
Outperforming C++ is definitely harder but Java should be doable.
> If you're talking about using to_owned or clone without reason, then it's fully on the developer.
Well, if we could just make developers smarter then everything would be easy, but we can't. It's reasonable to ask whether real-world developers working in Rust end up doing enough extra copying to outweigh the overhead of a JVM-like garbage collector that would let them avoid ever manually copying.
Do you mind sharing an example? If you're talking about using to_owned or clone without reason, then it's fully on the developer. Some more pitfalls to avodi: https://llogiq.github.io/2017/06/01/perf-pitfalls.html
What you say definitely doesn't match my experience. I would say Java code and Rust code are roughly in the same order of processing speed but the JVM "wastes" some memory. You also have garbage collection complicating performance in some scenarios.
I'm pretty sure you can get in the same processing speed ballpark with careful programming in both languages.
Outperforming C++ is definitely harder but Java should be doable.