[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: poor m4 hash performance

From: Ralf Wildenhues
Subject: Re: poor m4 hash performance
Date: Mon, 5 Jun 2006 08:45:06 +0200
User-agent: Mutt/1.5.11+cvs20060403

[ removing autoconf list -- please Cc: me on replies ]

* Eric Blake wrote on Mon, Jun 05, 2006 at 12:09:07AM CEST:
> According to Ralf Wildenhues on 6/4/2006 2:56 PM:
> > * Eric Blake wrote on Sun, Jun 04, 2006 at 05:40:05AM CEST:
> >> m4: lookup mode 0 called 229730 times, 557880 compares, 348729 misses, 
> >> 4672624 bytes

> > [ coreutils ]
> >> m4: lookup mode 0 called 2526799 times, 9834148 compares, 7470505 misses, 
> >> 84329947 bytes
> > 
> > This is still not bad at 3.9 compares per call.
> But it can be made better - 3.9 strcmp per call is somewhat reduced by
> increasing the number of hash buckets.  The problem is whether that is the
> hotspot in m4; and my experiments confirm what Paul found, that it was
> slightly noticeable, but not earth-shattering.

Even if it were a hotspot, you'd have to weigh the larger hash table
against the larger memory set now, and whether it may just cause more
cache misses.

I still maintain that more may be bought by evaluating and rewriting
some Autoconf macros; eliminating multiple recursion, where present, and
maybe pushing some of the larger quadratically growing strings to using
lists of macros, and expanding them only very late, or so.  No, I can't
prove this ATM, sorry, it's merely the impression I got after this:
But this kind of work certainly needs to wait until after 2.60.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]