February 09, 2015 hasmap with tuple as key | ||||
---|---|---|---|---|
| ||||
Is there any drawback of doing this: string[Tuple!(int, int)] a; Especially performance one. Thanks. |
February 10, 2015 Re: hasmap with tuple as key | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ondra | On Monday, 9 February 2015 at 21:22:29 UTC, Ondra wrote:
> Is there any drawback of doing this: string[Tuple!(int, int)] a;
>
> Especially performance one.
>
> Thanks.
Tuples are really just structs generated "on the fly", so they are very fast. Hashmaps use the GC, though, so keep that in mind.
|
Copyright © 1999-2021 by the D Language Foundation