|
|
|
|
|
by MrBuddyCasino
805 days ago
|
|
Yes, and this is what I was curious about, because I haven't seen the performance cost of this discussed a lot. Worded differently: does the strict concept of ownership/lifestimes in Rust bias a default (naive) implementation towards lower performance (eg due to required copying) when compared to a naive Golang (or even Java) implementation? I have no doubts that after heavy optimization, Rust beats languages such as Go & Java. |
|
When I learned Rust, I actually never went with the "use clone or Arc to make your life easier while learning" recommendation but always used references and learned how to use lifetime declarations and program design to go as far with them as reasonable. TBF I had experience with C and C++ already. But once reasonably experienced working in Rust (after a year?), your code should be faster most of the time the way you write it on the first try without needing optimization work.