[pypy-issue] [issue1565] Assembler: Linear search in corner cases

Armin Rigo tracker at bugs.pypy.org
Mon Jul 29 17:21:57 CEST 2013


New submission from Armin Rigo <armin.rigo at gmail.com>:

A "guard_value" where a lot of different values are seen at run-time can end up
badly as a lot of compiled paths.  We might try to have a general way to give up
in these situations.  For now, they are compiled as a linear chain of CMP/JNE,
which makes looking up the correct code path potentially very slow; a first fix
would be to improve this in x86/assembler.py.

Attached is an example: it runs 10x slower on PyPy than on CPython (and, as
expected, 5x slower than with "--jit off").

----------
files: x.py
messages: 6002
nosy: arigo, pypy-issue
priority: performance bug
status: unread
title: Assembler: Linear search in corner cases

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


More information about the pypy-issue mailing list