[Mono-dev] Dictionary`2: optimized and serialization-compatible with MS.net

Paolo Molaro lupus at ximian.com
Wed Jun 6 13:36:05 EDT 2007


On 05/31/07 Juraj Skripsky wrote:
> Index: System.Collections.Generic/Dictionary.cs
> ===================================================================
> --- System.Collections.Generic/Dictionary.cs	(revision 78207)
> +++ System.Collections.Generic/Dictionary.cs	(working copy)

The change looks fine overall.
A few questions: did you have a measurable speedup by keeping the
hashcode around (if you tested with that case)?
Could you also experiment with separate key and value arrays
(it would help a lot for the cases where one of the two is not a
reference during GC)?
It would also be nice to try a variation with a 0 NO_SLOT value, because
it means you don't have to spend time initializing it (and it would mean
starting allocations of slots at 1 or adding compensation code, though).

Thanks!

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better



More information about the Mono-devel-list mailing list