Associative arrays with void values

dsimcha dsimcha at yahoo.com
Sun Apr 12 18:10:37 PDT 2009


== Quote from bearophile (bearophileHUGS at lycos.com)'s article
> dsimcha:
> > 1.  Without the void[someType] hack, it wastes at least one byte per element,
> > sometimes a lot more depending on alignment issues.
> I think it never wastes one byte. The GC allocates blocks of memory with a
length as a power of 2, for small sizes. You can see this very well if you do few
experiments with big AAs.
> Bye,
> bearophile

What if the key is a long?



More information about the Digitalmars-d mailing list