3 ms·
We tried making copy/move an optimization. The number of useless copies that ended up in the resulting code was absurd. You think compile times are bad now…
by pcwalton 10y ago
We tried making copy/move an optimization. The number of useless copies that ended up in the resulting code was absurd. You think compile times are bad now…
- Animats 10y agoYou mean there were lots of copies that made it to the back end, only to be converted to non-mutable references late in the compilation process?
- pcwalton 10y agoHow do you convert copies to non-mutable references? That involves proving things about aliasing. Even in Rust that is not that easy…
- Animats 10y agoThe other way round. Sometimes you want to convert non-mutable references to non-mutable copies. This is almost always a win for int, float, etc., and usually a win for anything up to 8 bits on a modern processor.
- uabstraction 10y agoI'm going to nitpick and suggest that you almost certainly meant 8 _bytes_.