[pypy-svn] r13671 - pypy/dist/pypy/translator/test
tismer at codespeak.net
tismer at codespeak.net
Wed Jun 22 00:42:24 CEST 2005
Author: tismer
Date: Wed Jun 22 00:42:23 2005
New Revision: 13671
Modified:
pypy/dist/pypy/translator/test/rpystone.py
Log:
removed range, because it made measures very flaky.
On my machine, I get around a factor of 40 for slow mode
and some unbelievable 1600 for fast mode.
The latter is probably due to code removal.
But that's fine, too.
For real testing, we should use something that produces
a result that cannot be ignored by optimizatiion, tho.
Modified: pypy/dist/pypy/translator/test/rpystone.py
==============================================================================
--- pypy/dist/pypy/translator/test/rpystone.py (original)
+++ pypy/dist/pypy/translator/test/rpystone.py Wed Jun 22 00:42:23 2005
@@ -110,8 +110,13 @@
#global PtrGlbNext
starttime = clock()
- for i in range(loops):
- pass
+ #for i in range(loops):
+ # this is bad with very large values of loops
+ # XXX xrange support?
+ i = 0
+ while i < loops:
+ i += 1
+ # the above is most likely to vanish in C :-(
nulltime = clock() - starttime
g.PtrGlbNext = Record()
@@ -127,7 +132,11 @@
EnumLoc = None # addition for flow space
starttime = clock()
- for i in range(loops):
+ #for i in range(loops):
+ # this is bad with very large values of loops
+ # XXX xrange support?
+ i = 0
+ while i < loops:
if XP5:Proc5()
if XP4:Proc4()
IntLoc1 = 2
@@ -150,6 +159,7 @@
IntLoc2 = IntLoc3 / IntLoc1
IntLoc2 = 7 * (IntLoc3 - IntLoc2) - IntLoc1
if XP2:IntLoc1 = Proc2(IntLoc1)
+ i += 1
benchtime = clock() - starttime - nulltime
return benchtime, (loops / benchtime)
More information about the Pypy-commit
mailing list