[pypy-svn] r39752 - pypy/branch/rope-branch/pypy/objspace/std

arigo at codespeak.net arigo at codespeak.net
Fri Mar 2 21:05:15 CET 2007


Author: arigo
Date: Fri Mar  2 21:05:12 2007
New Revision: 39752

Modified:
   pypy/branch/rope-branch/pypy/objspace/std/rope.py
Log:
A minor optimization that makes the flow space happier.


Modified: pypy/branch/rope-branch/pypy/objspace/std/rope.py
==============================================================================
--- pypy/branch/rope-branch/pypy/objspace/std/rope.py	(original)
+++ pypy/branch/rope-branch/pypy/objspace/std/rope.py	Fri Mar  2 21:05:12 2007
@@ -282,8 +282,8 @@
     if times == 1:
         return node
     end_length = node.length() * times
-    num_bits = 0
-    mask = times
+    num_bits = 2
+    mask = times >> 2
     while mask:
         num_bits += 1
         mask >>= 1



More information about the Pypy-commit mailing list