Mercurial > hg
comparison hgeditor @ 16803:107a3270a24a
cleanup: use the deque type where appropriate
There have been quite a few places where we pop elements off the
front of a list. This can turn O(n) algorithms into something more
like O(n**2). Python has provided a deque type that can do this
efficiently since at least 2.4.
As an example of the difference a deque can make, it improves
perfancestors performance on a Linux repo from 0.50 seconds to 0.36.
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Tue, 15 May 2012 10:46:23 -0700 |
parents | 2b440bb8a66b |
children | 1aee2ab0f902 |
comparison
equal
deleted
inserted
replaced
16802:7e5d94381cd1 | 16803:107a3270a24a |
---|