[pypy-issue] [issue1345] Improve warmup time of recursive calls [ Pypy slow in recursion ]

Diego Javier Zea tracker at bugs.pypy.org
Mon Dec 3 02:19:24 CET 2012


New submission from Diego Javier Zea <diego_zea at yahoo.com.ar>:

I check the timing for this recursive function [ fib(n) ] on Pypy [ 1.9 and 2.0
] and Python [ 2.7 and 3.0 ] and Pypy is slower than python with n < 30. After
this, Pypy 1.9 seems to be a little more faster than 2.0 [ but maybe is not
significantly different ]:

n   Julia	Pypy1.9	Pypy2.0	Python2.7 Python3.2
10  1.145	0.039	0.087	0.015	0.036
20  0.077	47.5	80	2.19	4.060
30  9.26	139	189	207	504
40  1154	19467	21390	26020	39166
50  144305	2796847	2913148	4227585	4168628


The function is from perf.py of Julia git:

## fibonacci ##
def fib(n):
    if n<2:
        return n
    return fib(n-1)+fib(n-2)

----------
files: warmup.png
messages: 5053
nosy: diego_zea, pypy-issue
priority: performance bug
release: 2.0
status: unread
title: Improve warmup time of recursive calls [ Pypy slow in recursion ]

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1345>
________________________________________


More information about the pypy-issue mailing list