Author: Alex Gaynor <[email protected]>
Branch: dynamic-specialized-tuple
Changeset: r54748:41a3b45ba449
Date: 2012-04-25 09:57 -0400
http://bitbucket.org/pypy/pypy/changeset/41a3b45ba449/

Log:    unroll this sometimes

diff --git a/pypy/objspace/std/tupleobject.py b/pypy/objspace/std/tupleobject.py
--- a/pypy/objspace/std/tupleobject.py
+++ b/pypy/objspace/std/tupleobject.py
@@ -34,6 +34,9 @@
     def __init__(self, tuplestorage):
         self.tuplestorage = tuplestorage
 
+    @jit.look_inside_iff(lambda self, space:
+        jit.isvirtual(self) or (jit.isconstant(self.length()) and self.length 
< UNROLL_TUPLE_LIMIT)
+    )
     def tolist(self, space):
         items_w = [None] * self.length()
         for i in xrange(self.length()):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to