Mercurial > hg
comparison tests/test-merge-revert.t @ 31020:2d1bf84046f6
smartset: use native set operations as fast paths
For set operations like "&" and "-", where we know both basesets have their
sets ready, and the first set is sorted, use the native Python set
operations as a fast path.
Note: "+" is not optimized as that will break the ordering.
This leads to noticeable improvements on performance:
revset | before | after | delta
----------------------------------------------------------------
draft() & draft() & draft() & draft() | 776 | 477 | -39%
draft() + draft() + draft() + draft() | 2849 | 2864 |
draft() - draft() + draft() - draft() | 943 | 240 | -75%
draft() - draft() - draft() - draft() | 557 | 197 | -64%
(time measured in microseconds)
author | Jun Wu <quark@fb.com> |
---|---|
date | Sat, 18 Feb 2017 17:23:43 -0800 |
parents | 28e2e3804f2e |
children | 55c6ebd11cb9 |
comparison
equal
deleted
inserted
replaced
31019:74f77f1c2215 | 31020:2d1bf84046f6 |
---|