2 ms·
I'm not familiar with Rust, but I wonder how much copying this does for deeply nested types?
by skybrian 12y ago
I'm not familiar with Rust, but I wonder how much copying this does for deeply nested types?
- steveklabnik 12y agoRust has move semantics by default. A move does a bytewise copy, and then disallows access from the old location. This code largely just copies pointers around.
- frankmcsherry 12y agoI totally left the #[inline(always)] out from the code, in the interest of explaining. That's what prevents the copying! :D And also what Steve said about Rust being rly rly smart, or at least move semantics opening the door for that.