[pypy-svn] r78646 - pypy/branch/jit-unroll-loops/pypy/module/array/benchmark

hakanardo at codespeak.net hakanardo at codespeak.net
Tue Nov 2 19:08:26 CET 2010


Author: hakanardo
Date: Tue Nov  2 19:08:25 2010
New Revision: 78646

Modified:
   pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/Makefile
   pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/circulartst.py
Log:
Adjusted benchmark to test array

Modified: pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/Makefile
==============================================================================
--- pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/Makefile	(original)
+++ pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/Makefile	Tue Nov  2 19:08:25 2010
@@ -19,6 +19,6 @@
 	@/usr/bin/time -f '%e s' ../../../translator/goal/pypy-c $^tst.py 2>&1 | tail -1
 	@echo -n 'pypy-trunk: '
 	@/usr/bin/time -f '%e s' ../../../../../trunk/pypy/translator/goal/pypy-c $^tst.py 2>&1 | tail -1
-	#@echo -n '   cpython: '
-	#@/usr/bin/time -f '%e s' python $^tst.py 2>&1 | tail -1
-	#@echo
+	@echo -n '   cpython: '
+	@/usr/bin/time -f '%e s' python $^tst.py 2>&1 | tail -1
+	@echo

Modified: pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/circulartst.py
==============================================================================
--- pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/circulartst.py	(original)
+++ pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/circulartst.py	Tue Nov  2 19:08:25 2010
@@ -1,3 +1,6 @@
+import sys
+sys.setcheckinterval(1<<20)
+
 from array import array
 class Circular(array):
     def __new__(cls):
@@ -12,8 +15,7 @@
     buf = Circular()
     i = 10
     sa = 0
-    #         1048576
-    while i < 949999:
+    while i < 200000000:
         sa += buf[i-2] + buf[i-1] + buf[i] + buf[i+1] + buf[i+2]
         if i%100 == 0: sys.stderr.write('%d\n'%i)
         i += 1



More information about the Pypy-commit mailing list