On 1/13/06, Chad Robinson <[EMAIL PROTECTED]> wrote:
> I'm confused. My understanding is that Dictionary is supposed to be much more
> efficient here because it doesn't box and unbox. But, when I run the generic
> version, it takes 4.18s to run on average, while the Hashtable version takes
> 2.54s to run. Despite the boxing, the Hashtable runs MUCH faster. This is
> running with --optimize=all (doesn't seem to change anything either way).

Using custom IEqualityComparer helps a bit (see attached testecase).
Otherwise it is probably Dictionary implementation that is not as
optimized as the Hashtable.

--
   Michal Moskal,
   http://nemerle.org/~malekith/

Attachment: foo.cs
Description: Binary data

_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to