[pypy-issue] [issue1067] Performance on Stack-Based VM machine
Winston Ewert
tracker at bugs.pypy.org
Tue Feb 21 21:52:49 CET 2012
New submission from Winston Ewert <winstonewert at gmail.com>:
For me this runs 20x faster on Python 2.7.1+ then on PyPy 1.8
----------
files: go2.py
messages: 3993
nosy: pypy-issue, winstonewert
priority: performance bug
status: unread
title: Performance on Stack-Based VM machine
________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1067>
________________________________________
-------------- next part --------------
import time
def execute(program):
stack = []
for op in program:
if op == 'd':
stack.append( 0 )
elif op == 'e':
stack.append( 1 )
elif op == 'f':
stack.append( stack.pop() + stack.pop())
def main():
for generation in range(20000):
execute('eefddffedff')
main()
t = time.time()
main()
print time.time() - t
More information about the pypy-issue
mailing list