2009/10/21 Lukas Renggli <[email protected]>:
>> yyyyyyyyeeeeeeeeeeesssssssssssssssssssssssss
>> and get linearrrrrrrrrrrrrrrrrrrrrly boring and slow.
>
> Yes, but only if your objects don't implement #hash properly. HashMap
> trades space and time to get O(1) behavior IF you have lots of
> elements with bad hash values. If the hash values are good (which is
> the case most of the time) or if you have not that many elements
> (which is the case most of the time), it is a waste of time and space
> though.
>
Right.
That's why each of implementations (Dictionary and HashTable) having own niche.
For small sizes, dictionaries in their current state is best.
For bigger sizes, one could choose to use HashTable, or any other
implementation, which may fit better.

Ultimately, there is no solution which is best in all cases (space,
access time, insertion/remove time etc).

> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



-- 
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to