A case for valueless AA's?

bearophile bearophileHUGS at lycos.com
Tue Mar 29 15:42:59 PDT 2011


Piotr Szturmaj:

> void[0][string] aa;
> aa["key"] = [];
> assert("key" in aa);

Nice. I have done a benchmark, and it seems a void[0][int] uses the same amount of memory as a int[int]. I have not tried a void[0][string].

Bye,
bearophile


More information about the Digitalmars-d mailing list