enforce()?

Steven Schveighoffer schveiguy at yahoo.com
Mon Jul 19 13:57:44 PDT 2010


On Mon, 19 Jul 2010 16:41:50 -0400, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

> On 07/19/2010 03:09 PM, Steven Schveighoffer wrote:
>> Take the
>> redblack tree node for instance. Get rid of the pad byte, and it's tuned
>> for word-size payload. But go over that, and you're back to pretty much
>> wasting 50% of your memory.
>
> I think this characterization is a bit inaccurate because it suggests  
> that there are gains only for one-word payloads. I think the truth is  
> that there are gain for several payloads. Their relative value decreases  
> with the size of the payload.
>
> Long story short - the less slack (byte of overhead, bool for red/black  
> information), the better (in various quanta and of various values).

There is a cost though...  which was my point.  Isn't everyone always  
saying around here how cheap memory is these days? ;)

-Steve


More information about the Digitalmars-d mailing list