Subject: Re: praise
To: Jason R Thorpe <>
From: David Laight <>
List: port-alpha
Date: 11/08/2002 17:18:55
On Fri, Nov 08, 2002 at 08:18:24AM -0800, Jason R Thorpe wrote:
> On Fri, Nov 08, 2002 at 05:44:07PM +0200, Jarkko Teppo wrote:
>  > With 1.6K and current pkgsrc mozilla is ~faster than compat-osf netscape.
>  > I can't even begin to describe the difference. This is nothing short of
>  > amazing.
>  > 
>  > This is just too cool to be true.
> This is, in large part, due to the work that Charles Hannum did on the
> dynamic linker (and I added one Alpha-specific performance improvement,
> as well).
> I'm very glad that you're pleased with the results :-)

I think someone did something to the kernel page fault code as well.

There is also scope for improving the layout of the .so files.
At the moment the dynamic symbol table hash table is sized to
the 'first prime above' the 'power of 2 below' the number of
symbols (giving an average chain length of about 1.5).

Now a lot of the lookups done (especially for things like mozilla)
actually fail, so you do 1.5 checks per library per symbol.

If the hash table were made (say) 4 times larger a significant
number of the failing lookups would (hopefully) hit empty chains.

I did a little playing around hashing the symbols from libc, the
'prime' hash was only averagely good.  The only bad ones were
powers of two.  For systems without hardware divide (and maybe
even those with it) hashing modulo (2^n - 1) will be quicker
(use the 'add the digits' algorithm).

Also since the time spent in strcmp() is not insignificant,
using memcpy() would be faster.  As would ensuring the strings
being compared are word aligned.

These are (probably) trivial changes to ld.


David Laight: