[pypy-svn] r32270 - pypy/dist/pypy/translator/test

arigo at codespeak.net arigo at codespeak.net
Wed Sep 13 18:03:36 CEST 2006


Author: arigo
Date: Wed Sep 13 18:03:35 2006
New Revision: 32270

Modified:
   pypy/dist/pypy/translator/test/rpystone.py
Log:
Avoid a division by zero.


Modified: pypy/dist/pypy/translator/test/rpystone.py
==============================================================================
--- pypy/dist/pypy/translator/test/rpystone.py	(original)
+++ pypy/dist/pypy/translator/test/rpystone.py	Wed Sep 13 18:03:35 2006
@@ -146,6 +146,8 @@
         i += 1
 
     benchtime = clock() - starttime - nulltime
+    if benchtime < 1E-8:
+        benchtime = 1E-8   # time too short, meaningless results anyway
     return benchtime, (loops / benchtime)
 
 def Proc1(PtrParIn):



More information about the Pypy-commit mailing list