[pypy-svn] r39918 - pypy/dist/pypy/rpython/microbench
antocuni at codespeak.net
antocuni at codespeak.net
Sun Mar 4 20:08:04 CET 2007
Author: antocuni
Date: Sun Mar 4 20:08:02 2007
New Revision: 39918
Modified:
pypy/dist/pypy/rpython/microbench/list.py
pypy/dist/pypy/rpython/microbench/microbench.py
Log:
I finally found a sensible benchmark that is considerably slower on
gencli that on genc.
Modified: pypy/dist/pypy/rpython/microbench/list.py
==============================================================================
--- pypy/dist/pypy/rpython/microbench/list.py (original)
+++ pypy/dist/pypy/rpython/microbench/list.py Sun Mar 4 20:08:02 2007
@@ -49,3 +49,17 @@
args = ['obj', 'i']
def loop(obj, i):
obj[i%1000] = i
+
+class list__iteration:
+ __metaclass__ = MetaBench
+ LOOPS = 100000
+ def init():
+ obj = [0]*1000
+ obj[0] = 42
+ return obj
+ args = ['obj']
+ def loop(obj):
+ tot = 0
+ for item in obj:
+ tot += item
+ return tot
Modified: pypy/dist/pypy/rpython/microbench/microbench.py
==============================================================================
--- pypy/dist/pypy/rpython/microbench/microbench.py (original)
+++ pypy/dist/pypy/rpython/microbench/microbench.py Sun Mar 4 20:08:02 2007
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
import sys
import autopath
from time import clock
More information about the Pypy-commit
mailing list