[pypy-svn] r23015 - pypy/dist/pypy/translator/microbench

pedronis at codespeak.net pedronis at codespeak.net
Sat Feb 4 01:18:48 CET 2006


Author: pedronis
Date: Sat Feb  4 01:18:46 2006
New Revision: 23015

Modified:
   pypy/dist/pypy/translator/microbench/test_count1.py
Log:
microbench involving __get__ / __set__ (of slots)



Modified: pypy/dist/pypy/translator/microbench/test_count1.py
==============================================================================
--- pypy/dist/pypy/translator/microbench/test_count1.py	(original)
+++ pypy/dist/pypy/translator/microbench/test_count1.py	Sat Feb  4 01:18:46 2006
@@ -7,6 +7,18 @@
         x = x + 1
 
 #
+def test_count_in_slot():
+    class X(object):
+        __slots__ = 'x'
+    x = X()
+    c = 0
+    x.x = 0
+    n = N
+    while c < n:
+        x.x = x.x + 1
+        c += 1
+    
+#
 def plus1(x):
     return x + 1
 



More information about the Pypy-commit mailing list