[pypy-svn] r57157 - pypy/branch/garden-call-code/pypy/interpreter/callbench

pedronis at codespeak.net pedronis at codespeak.net
Sun Aug 10 11:40:22 CEST 2008


Author: pedronis
Date: Sun Aug 10 11:40:20 2008
New Revision: 57157

Modified:
   pypy/branch/garden-call-code/pypy/interpreter/callbench/sup.py
Log:
trying to make benchmarks more stable



Modified: pypy/branch/garden-call-code/pypy/interpreter/callbench/sup.py
==============================================================================
--- pypy/branch/garden-call-code/pypy/interpreter/callbench/sup.py	(original)
+++ pypy/branch/garden-call-code/pypy/interpreter/callbench/sup.py	Sun Aug 10 11:40:20 2008
@@ -16,10 +16,20 @@
         st[0] = t()
 
     ref(n, start)
-    elapsed_ref = t() - st[0]
+    elapsed_ref1 = t() - st[0]
+    ref(n, start)
+    elapsed_ref2 = t() - st[0]
+    ref(n, start)
+    elapsed_ref3 = t() - st[0]    
+    elapsed_ref = min(elapsed_ref1, elapsed_ref2, elapsed_ref3)
 
     func(n, start)
-    elapsed = t() - st[0]
+    elapsed1 = t() - st[0]
+    func(n, start)
+    elapsed2 = t() - st[0]
+    func(n, start)
+    elapsed3 = t() - st[0]
+    elapsed = min(elapsed1, elapsed2, elapsed3)    
 
     #if elapsed < elapsed_ref*10:
     #    print "not enough meat", elapsed, elapsed_ref



More information about the Pypy-commit mailing list