News for hackers. Stuff that matters.
Re:Should Small Rust Structs be Passed by-copy or by-borrow? by elimerl on Saturday December 31, 2022 @05:18PM (#34201340)
The idea is that the "default" is the easy thing, which is usually optimized by the compiler.
Re:Should Small Rust Structs be Passed by-copy or by-borrow? by TillE on Saturday December 31, 2022 @07:12PM (#34202139)
When you're writing in a language like Rust or C++, you know broadly what the compiler optimizes and what it probably won't. You do need to do the work yourself a lot of the time.