Associative arrays with void values

bearophile bearophileHUGS at lycos.com
Sun Apr 12 16:17:56 PDT 2009


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



More information about the Digitalmars-d mailing list