[PATCH] Speed up manifest parsing by 4x

Eric M. Hopper hopper at omnifarious.org
Wed Mar 26 11:21:46 CDT 2008


On Wed, 2008-03-26 at 08:59 -0500, Matt Mackall wrote:
> On Wed, 2008-03-26 at 11:18 +0100, Adrian Buehlmann wrote:
> >  The alternative is to initialize when defining, which has no speed
> > penalty.
> 
> Speaking as someone who spends a lot of time doing optimization work in
> the Linux kernel: definitely not true. Initializers are code that gets
> run at every function invocation. It takes both cycles and, perhaps more
> importantly, cache footprint. Taking an extra cacheline hit is very
> expensive.

It's disappointing that gcc isn't good enough yet to eliminate almost
all such initializations through analysis of when a variable's value is
used or set.  Regardless, I think the value of them in most cases far
outweighs the performance hit incurred by the extra instructions and
cache fetches. 

My two cents,
-- 
A word is nothing more or less than the series of historical
connotations given to it. That's HOW we derive meaning, and to claim
that there is an arbitrary meaning of words above and beyond the way
people use them is a blatant misunderstanding of the nature of language.
-- Anonymous blogger
-- Eric Hopper (hopper at omnifarious.org http://www.omnifarious.org/~hopper)--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 185 bytes
Desc: This is a digitally signed message part
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20080326/a38d7712/attachment.pgp 


More information about the Mercurial-devel mailing list