[pypy-issue] [issue873] PyPy almost 300 times slower in recursive AST evaluation

Armin Rigo tracker at bugs.pypy.org
Wed Feb 15 17:34:09 CET 2012


Armin Rigo <armin.rigo at gmail.com> added the comment:

I guess that it was caused by a recursive triggering of the JIT, which would
repeatedly start tracing from the same point at *all* levels of recursion.  We
fixed an issue like that.

The crash that we still get is indeed a stack exhaustion.  With a script that
starts with sys.setrecursionlimit(10**5), you're basically asking to get a
segfault instead of a "RuntimeError: recursion limit exceeded".  Sorry, PyPy is
limited like CPython in that the levels of Python recursion correspond to C
recursion, and thus exhaust the C stack limit.  You can try to increase the
latter, e.g. on Linux:

ulimit -s 81920    # sets the stack size to 80 MB instead of 8 MB by default

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


More information about the pypy-issue mailing list