revset: uncache filteredset.__contains__
Since
96b6b3d78697, condition function returns a cached value, so there's
little benefit to cache __contains__.
No measurable difference found in contrib/base-revsets.txt.
--- a/mercurial/revset.py Sat Aug 22 17:08:37 2015 -0700
+++ b/mercurial/revset.py Sat Sep 05 12:56:53 2015 +0900
@@ -3077,14 +3077,9 @@
"""
self._subset = subset
self._condition = condition
- self._cache = {}
def __contains__(self, x):
- c = self._cache
- if x not in c:
- v = c[x] = x in self._subset and self._condition(x)
- return v
- return c[x]
+ return x in self._subset and self._condition(x)
def __iter__(self):
return self._iterfilter(self._subset)