[pypy-svn] r10282 - pypy/dist/pypy/objspace/std
tismer at codespeak.net
tismer at codespeak.net
Mon Apr 4 15:14:06 CEST 2005
Author: tismer
Date: Mon Apr 4 15:14:06 2005
New Revision: 10282
Modified:
pypy/dist/pypy/objspace/std/listobject.py
Log:
tu(r)ned listrepr with applevelinterp, gives some 20+ % speedup on repr(somelist)
Modified: pypy/dist/pypy/objspace/std/listobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/listobject.py (original)
+++ pypy/dist/pypy/objspace/std/listobject.py Mon Apr 4 15:14:06 2005
@@ -305,8 +305,8 @@
items[start+i*step] = sequence2[i]
return space.w_None
-listrepr = gateway.appdef("""
- listrepr(currently_in_repr, l):
+app = gateway.applevelinterp("""
+ def listrepr(currently_in_repr, l):
'The app-level part of repr().'
list_id = id(l)
if list_id in currently_in_repr:
@@ -320,7 +320,9 @@
except:
pass
""")
-
+
+listrepr = app.interphook("listrepr")
+
def repr__List(space, w_list):
if w_list.ob_size == 0:
return space.wrap('[]')
More information about the pypy-svn
mailing list