Rev 4621: Moving into attributes instead of dicts improves performance: in http://bazaar.launchpad.net/~jameinel/bzr/1.19-known-graph-sorted

John Arbash Meinel john at arbash-meinel.com
Sun Aug 16 04:33:47 BST 2009


At http://bazaar.launchpad.net/~jameinel/bzr/1.19-known-graph-sorted

------------------------------------------------------------
revno: 4621
revision-id: john at arbash-meinel.com-20090816033334-wd76itgbm30rzl37
parent: john at arbash-meinel.com-20090816033140-s42d2fpbs4h3dlpu
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.19-known-graph-sorted
timestamp: Sat 2009-08-15 22:33:34 -0500
message:
  Moving into attributes instead of dicts improves performance:
  -    #  194ms graph.KnownGraph().merge_sort()
  -    #  143ms kg.merge_sort()
  +    #  138ms graph.KnownGraph().merge_sort()
  +    #   89ms kg.merge_sort()
  
  Probably the biggest win is that we can walk directly to the _MergeSortNode
  parent, without having to do dict lookups.
-------------- next part --------------
=== modified file 'bzrlib/_known_graph_pyx.pyx'
--- a/bzrlib/_known_graph_pyx.pyx	2009-08-16 03:31:40 +0000
+++ b/bzrlib/_known_graph_pyx.pyx	2009-08-16 03:33:34 +0000
@@ -453,8 +453,8 @@
 
     # Current performance numbers for merge_sort(bzr_dev_parent_map):
     #  310ms tsort.merge_sort()
-    #  194ms graph.KnownGraph().merge_sort()
-    #  143ms kg.merge_sort()
+    #  138ms graph.KnownGraph().merge_sort()
+    #   89ms kg.merge_sort()
 
     cdef KnownGraph graph
     cdef object _stack  # list



More information about the bazaar-commits mailing list