[PATCH 1 of 7] revset: introduce a _revinterval type and revsubset function

Bryan O'Sullivan bos at serpentine.com
Fri Jun 22 18:56:24 CDT 2012


On Fri, Jun 22, 2012 at 6:37 PM, Matt Mackall <mpm at selenic.com> wrote:

>
> I believe it. But when a is _also_ large, it's not clear that it's a
> win, due to the expense of _revinterval._contains_.
>

That's right. I figured your reasoning here was correct, but I went off and
quantified it via a benchmark. The set type's membership check always wins,
with the scale starting at about 1.8.

Now imagine a type that looks like:
>
>  class rset(object):
>     ...
>
> This can make its own decision about which of the four filter strategies
> to use, and create and cache list and set objects as needed from
> whatever you pass the constructor.


Interesting idea. I'll give it a try and see where it leads.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120622/b0259e2f/attachment.html>


More information about the Mercurial-devel mailing list