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

ac at codespeak.net ac at codespeak.net
Tue Mar 14 14:52:08 CET 2006


Author: ac
Date: Tue Mar 14 14:52:07 2006
New Revision: 24360

Modified:
   pypy/dist/pypy/translator/microbench/test_count1.py
Log:
(pedronis,arre) Some more benchmarks.

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	Tue Mar 14 14:52:07 2006
@@ -169,3 +169,35 @@
         c = c + 1
 
 #
+
+def test_count_in_attr():
+    class X(object):
+        pass
+    x = X()
+    c = 0
+    x.x = 0
+    n = N
+    while c < n:
+        x.x = x.x + 1
+        c += 1
+
+x = 0
+def test_count_in_global():
+    global x
+    c = 0
+    x = 0
+    n = N
+    while c < n:
+        x = x + 1
+        c += 1
+    
+
+def test_count_in_global2():
+    global y
+    c = 0
+    y = 0
+    n = N
+    while c < n:
+        y = y + 1
+        c += 1
+    



More information about the Pypy-commit mailing list