Sat, 19 Aug 2017 22:04:03 +0900 revsetlang: remove unused functions
Yuya Nishihara <yuya@tcha.org> [Sat, 19 Aug 2017 22:04:03 +0900] rev 34064
revsetlang: remove unused functions Superseded by the _match() function.
Wed, 17 Feb 2016 21:40:59 +0900 revsetlang: match tree by helper function on optimize
Yuya Nishihara <yuya@tcha.org> [Wed, 17 Feb 2016 21:40:59 +0900] rev 34063
revsetlang: match tree by helper function on optimize This should make optimize() more readable and less error-prone, but it doubles the parsing cost. (original) $ python -m timeit -n10000 -s 'from mercurial import revsetlang as L' \ 'L.optimize(L.analyze(L.parse("ancestors(x) and not ancestors(y)")))' 10000 loops, best of 3: 79.3 usec per loop (this patch) $ python -m timeit -n10000 -s 'from mercurial import revsetlang as L' \ 'L._treecache.clear(); \ L.optimize(L.analyze(L.parse("ancestors(x) and not ancestors(y)")))' 10000 loops, best of 3: 201 usec per loop
Wed, 17 Feb 2016 21:31:09 +0900 parser: add helper function to test if pattern matches parsed tree
Yuya Nishihara <yuya@tcha.org> [Wed, 17 Feb 2016 21:31:09 +0900] rev 34062
parser: add helper function to test if pattern matches parsed tree This function will be used as follows: match('ancestors(_) and not ancestors(_)', x) See the next patch for details.
Wed, 17 Feb 2016 21:38:25 +0900 revsetlang: build optimized tree by helper function
Yuya Nishihara <yuya@tcha.org> [Wed, 17 Feb 2016 21:38:25 +0900] rev 34061
revsetlang: build optimized tree by helper function This should make optimize() more readable, but it doubles the parsing cost. (original) $ python -m timeit -n10000 -s 'from mercurial import revsetlang as L' \ 'L.optimize(L.analyze(L.parse("::tip")))' 10000 loops, best of 3: 18.1 usec per loop (this patch) $ python -m timeit -n10000 -s 'from mercurial import revsetlang as L' \ 'L._treecache.clear(); L.optimize(L.analyze(L.parse("::tip")))' 10000 loops, best of 3: 48.4 usec per loop 30usec isn't dominant compared to the revset evaluation, but that is a cost. That's why a parsed tree is cached, which can benefit in hgweb or chg server.
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -4 +4 +10 +30 +100 +300 +1000 +3000 +10000 tip