~bzr-pqm/bzr/bzr.dev

Viewing all changes in revision 4593.5.15.

  • Committer: John Arbash Meinel
  • Date: 2009-08-16 15:55:17 UTC
  • mto: This revision was merged to the branch mainline in revision 4629.
  • Revision ID: john@arbash-meinel.com-20090816155517-0r8eel6w60kq7i6o
Use the same implementation of stack handling to avoid append/pop.
Instead we track what the 'current' entry is, and then grow the stack only
when we need more space.

This also turns into using direct list access, rather than python apis.
Drops the time down:
-    #  138ms graph.KnownGraph().merge_sort()
-    #   89ms kg.merge_sort()
+    #  127ms graph.KnownGraph().merge_sort()
+    #   77ms kg.merge_sort()

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: