Re:Effective Rust
by tveita on Thursday June 15, 2023 @08:14AM
(#36339360)
From https://doc.rust-lang.org/std/vec/struct.Vec.html
So an empty vec![] is just a struct on the stack; very cheap to make, and easy for the compiler to optimize out if it can see that it's not used in some paths.
[ Parent
| on HN ]
There are no comments on this comment yet.