5 ms·
Yeah, it seems like suffering little tiny copies all over the place is regressing back to the thinly-spread performance sludge that Rust's ownership is designed
by titzer 3y ago
Yeah, it seems like suffering little tiny copies all over the place is regressing back to the thinly-spread performance sludge that Rust's ownership is designed to police and therefore eliminate. If it becomes too widespread a problem, then compilers will be tempted to start intrinsifying and then eliminating copies in order to make them fast and go away, which unfortunately will always come with cliffs where the compiler misses an opportunity. So the game theory of that in the end is that programmers do less and less and compilers do more and more.
Maybe this is an inevitable dynamic between compilers, library writers, and application writers? Seems to have played out in many languages.