[PATCH 1 of 2 obs-speedup] obsolete: add C implementation of _addsuccessors

Matt Mackall mpm at selenic.com
Tue Aug 25 15:52:59 CDT 2015


On Mon, 2015-08-24 at 14:25 -0400, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <augie at google.com>
> # Date 1440439282 14400
> #      Mon Aug 24 14:01:22 2015 -0400
> # Node ID 3aecfdbfe3ca54134cdb0e98944e8fca53bd46f1
> # Parent  207e95720308518aa40c2a91ce20fdf52dfa8550
> obsolete: add C implementation of _addsuccessors
> 
> Before, best of 10 runs:
> hg sl > /dev/null  0.75s user 0.07s system 99% cpu 0.828 total
> 
> After, best of 10 runs:
> ./hg sl > /dev/null  0.65s user 0.09s system 99% cpu 0.744 total
> 
> where
> alias.sl=log -Gr smart -Tsl
> revsetalias.smart=(parents(not public()) or not public() or . or head()) and (not obsolete() or unstable()^)
> 
> It's a straight-line port to C code, but still a 10% win on walltime
> for the command. I can live with that.

I'm kind of loathe to accept C code that isn't at least 4x or so faster
than what it's replacing, but this 10% doesn't measure that directly.
Can I get you to tweak perf.py to do that?

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list