[Mono-list] Re: Application performance question

Robert Jordan robertj at gmx.net
Fri Jan 13 16:54:07 EST 2006


Michal Moskal wrote:
> On 1/13/06, Chad Robinson <crj at lucubration.com> 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.

It's the runtime. Mono's Dictionary implementation performs very well
under MS.NET 2.0 (about 70% of the performance of MS' implementation).

Robert



More information about the Mono-list mailing list