is Associative Arrays good for integer type as key?
Steve Horne
stephenwantshornenospam100 at aol.com
Sun Nov 26 23:51:32 PST 2006
On Wed, 15 Nov 2006 02:36:58 +0000 (UTC), %u <newbie at dd.com> wrote:
>such as
>
>int[short] hashtable;
>
>where KeyType = short, and ValueType = int?
>
>will this work? and as optimized (memory-wise, and CPU-wise)?
>
>Thanks in advance for your conmments.
Associative arrays are sometimes called sparse arrays. They can be
good with integer indexes, if those indexes tend to be widely
distributed, with lots of unused indexes in between.
--
Remove 'wants' and 'nospam' from e-mail.
More information about the Digitalmars-d-learn
mailing list