Rev 5849: using tuple() is consistently slower. Save ~100ms more. in http://bazaar.launchpad.net/~jameinel/bzr/2.4-uncommit-faster

John Arbash Meinel john at arbash-meinel.com
Tue May 10 14:20:34 UTC 2011


At http://bazaar.launchpad.net/~jameinel/bzr/2.4-uncommit-faster

------------------------------------------------------------
revno: 5849
revision-id: john at arbash-meinel.com-20110510142027-jvdwzqeq5yr2zqmm
parent: john at arbash-meinel.com-20110510141211-2ptj7bi4piziiel8
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.4-uncommit-faster
timestamp: Tue 2011-05-10 16:20:27 +0200
message:
  using tuple() is consistently slower. Save ~100ms more.
  I'm guessing it happens enough that the overhead of calling tuple()
  costs more than the benefit of not having lists.
-------------- next part --------------
=== modified file 'bzrlib/dirstate.py'
--- a/bzrlib/dirstate.py	2011-05-10 14:12:11 +0000
+++ b/bzrlib/dirstate.py	2011-05-10 14:20:27 +0000
@@ -2632,7 +2632,7 @@
             try:
                 split = _split_dirs[dirpath]
             except KeyError:
-                split = tuple(dirpath.split('/'))
+                split = dirpath.split('/')
                 _split_dirs[dirpath] = split
             return (split, fname, file_id)
         return sorted(entry_list, key=_key)



More information about the bazaar-commits mailing list