Current state of revset performance.

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Oct 31 15:46:37 CDT 2014



On 10/31/2014 07:07 PM, Pierre-Yves David wrote:

> We also have a bad regression here. I just discovered it so I've no idea
> where it comes from.
>
>    revset #23: (20000::) - (20000)
>         plain           first           last
>    0)   0.005060        0.006131        0.006144
>    1)   0.013211   261% 0.005674    92% 0.013004   211%
>    2)   0.012788   252% 0.005525    90% 0.012252   199%
>    3)   0.023453   463% 0.022214   362% 0.007272   118%


The optimiser replace `(X::) - (X)` with `(not X) and X::`

So "subset" in the descendant call is "not X" a <filteredset> 
(fullreposet filtered with a `lambda x: x not in X`)

The old code was using:

   base = filteredset(args, subset.__contains__)

The new code, is using:

    base = subset & args

So we are penalised when subset is bigger//more expensive than args.

The new code is more correct and we should be able to buy back the 
regression with a smarter "&" implementation.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list