Mercurial > hg
comparison tests/test-hook.t @ 14065:8f7132fa5e59
pure mpatch: avoid using list.insert(0, ...)
In Python lists are implemented as arrays with overallocation. As a
result, list.insert(0, ...) is O(n), whereas list.append() has an
amortised running time of O(1). Reversing the internal representation
of the list should cause a slight speedup for pure Python builds.
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Sat, 30 Apr 2011 15:05:34 +0200 |
parents | 0fb2ff949790 |
children | 7f45b1911893 |
comparison
equal
deleted
inserted
replaced
14064:e4bfb9c337f3 | 14065:8f7132fa5e59 |
---|