[Mono-list] mcs compiles on linux. Now what?

Paolo Molaro lupus@ximian.com
Fri, 8 Mar 2002 00:59:00 +0100


On 03/07/02 Dan Lewis wrote:
> > System.Collections.Hashtable::Find() takes more than 40% of the compile
> > This suggest we may be using bad hash functions or that the hashtable
> > doesn't resize correctly, since the average compare per lookup is
> > greater than 5 (it should be about 1). So check the sources for
> > bad GetHashCode() implementations, create tests to check that the
> > hashtable behaves correctly when expanding.
> 
> I seem to remember the default GetHashCode() implementation returns 0 (a
> perfect hash function -- if there's only one key :). Would it be possible to
> implement Object.GetHashCode() as an internal call? (a shallow hash based on
> the object bits).

So, I recompiled the interpreter and runtime with optimizations
and without support for debugging and profiling: this got the compile
time down to less than 8 minutes.
I did a quick hack to make Object.GetHashCode() do something useful as
you suggest and the total compile time got down to 4 minutes and 25
secs!
Thanks! Will commit the changes tomorrow, and maybe provide other
profile information, I need to go to sleep now:-)

lupus

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