A really out there solution to reduce memory may be to use a Cap’n Proto style 
arena that uses offsets instead of pointers, but I’m sure there are a lot of 
difficult problems with that.

Eric 

On Mar 13, 2014, at 1:37 PM, Eric Summers <eric.summ...@me.com> wrote:

> Yes, but with tags you pay the cost even if Option is None.
> 
> Eric
> 
> On Mar 13, 2014, at 1:33 PM, Daniel Micay <danielmi...@gmail.com> 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
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to