4 ms·
Rust's push is a `move_back`. Curiously, it doesn't have any equivalent of emplace or placement new. It does memcpy on push, and relies on the optimizer to remo
by pornel 6y ago
Rust's push is a `move_back`. Curiously, it doesn't have any equivalent of emplace or placement new. It does memcpy on push, and relies on the optimizer to remove it.
- __s 6y agoRust gets away with this because it doesn't have move constructors. Which is a pain if you want self referencing structures, but avoids quite a bit of complexity