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

Matt Mackall mpm at selenic.com
Thu Aug 27 15:14:16 CDT 2015


On Wed, 2015-08-26 at 10:09 -0400, Augie Fackler wrote:
> On Tue, Aug 25, 2015 at 4:52 PM, Matt Mackall <mpm at selenic.com> wrote:
> > 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?
> 
> If my perf patch is right, this code didn't make much difference.

Huh. That's a bit unexpected, but I can't spot a problem.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list