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

hakanardo at codespeak.net hakanardo at codespeak.net
Wed Oct 20 16:29:47 CEST 2010


Author: hakanardo
Date: Wed Oct 20 16:29:46 2010
New Revision: 78135

Added:
   pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/result.txt
Modified:
   pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/Makefile
   pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/circulartst.py
Log:
some benchmark results

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	Wed Oct 20 16:29:46 2010
@@ -13,10 +13,12 @@
 
 run-%: %
 	@echo $^
-	@echo -n '        C: '
-	@/usr/bin/time -f '%e s' ./$^
-	@echo -n '     pypy: '
+	@echo -n '         C: '
+	@/usr/bin/time -f '%e s' ./$^ 2>&1 | tail -1
+	@echo -n '      pypy: '
 	@/usr/bin/time -f '%e s' ../../../translator/goal/pypy-c $^tst.py 2>&1 | tail -1
-	@echo -n '  cpython: '
-	@/usr/bin/time -f '%e s' python $^tst.py
+	@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

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	Wed Oct 20 16:29:46 2010
@@ -4,14 +4,14 @@
         self = array.__new__(cls, 'd', range(65536))
         return self
     def __getitem__(self, i):
-        assert self.__len__() == 65536 
+        assert len(self) == 65536 
         return array.__getitem__(self, i & 65535)
 
 def main():
     buf = Circular()
     i = 10
     sa = 0
-    while i < 20000000:
+    while i < 200000000:
         sa += buf[i-2] + buf[i-1] + buf[i] + buf[i+1] + buf[i+2]
         i += 1
     return sa

Added: pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/result.txt
==============================================================================
--- (empty file)
+++ pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/result.txt	Wed Oct 20 16:29:46 2010
@@ -0,0 +1,18 @@
+intimg
+         C: 0.29 s
+      pypy: 0.99 s
+pypy-trunk: 1.33 s
+   cpython: 68.20 s
+
+sum
+         C: 0.61 s
+      pypy: 0.59 s
+pypy-trunk: 0.74 s
+   cpython: 24.77 s
+
+circular
+         C: 0.47 s
+      pypy: 1.48 s
+pypy-trunk: 21.13 s
+   cpython: 869.56 s
+



More information about the Pypy-commit mailing list