www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - hasmap with tuple as key

reply "Ondra" <pokorny.ondrej gmail.com> writes:
Is there any drawback of doing this: string[Tuple!(int, int)] a;

Especially performance one.

Thanks.
Feb 09 2015
parent "Meta" <jared771 gmail.com> writes:
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.
Feb 09 2015