Mercurial > hg-stable
changeset 22856:c1546d7400ef
baseset: drop custom __and__ method
This add method is enforcing non-laziness, disabling multiple optimisations.
Benchmarks do not spot any significant regression but real usecase may. This
even gives some speedup in some cases:
revset #15: min(0::)
before) wall 0.001247 comb 0.000000 user 0.000000 sys 0.000000 (best of 1814)
after) wall 0.000942 comb 0.000000 user 0.000000 sys 0.000000 (best of 2367)
This will also be important for further improvement to addset later in this series.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 09 Oct 2014 04:27:25 -0700 |
parents | b5492b6bc7e8 |
children | 88e8a18329d3 |
files | mercurial/revset.py |
diffstat | 1 files changed, 0 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Thu Oct 09 04:27:01 2014 -0700 +++ b/mercurial/revset.py Thu Oct 09 04:27:25 2014 -0700 @@ -2382,12 +2382,6 @@ return self.filter(lambda x: x not in other) - def __and__(self, other): - """Returns a new object with the intersection of the two collections. - - This is part of the mandatory API for smartset.""" - return baseset([y for y in self if y in other]) - def isascending(self): """Returns True if the collection is ascending order, False if not.