Yes, but with tags you pay the cost even if Option is None. Eric
On Mar 13, 2014, at 1:33 PM, Daniel Micay <[email protected]> wrote: > On 13/03/14 02:25 PM, Eric Summers wrote: >> Also this approach uses more memory. At least a byte per pointer and >> maybe more with padding. In most cases like this you would prefer to >> use a vtable instead of tags to reduce the memory footprint. >> >> Eric > > A vtable uses memory too. Either it uses a fat pointer or adds at least > one pointer to the object. > _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
