[pypy-issue] [issue1652] Array search ( Sorting/index heavy) is 2.24x slower on PyPy than Python2 and Python3

kostia.lopuhin tracker at bugs.pypy.org
Sat Jan 18 18:58:16 CET 2014

kostia.lopuhin <kostia.lopuhin at gmail.com> added the comment:

On the code from archive I get 26 s for PyPy nighly (OS X 64 bit) and 16 s for 
CPython 2.7. If I put Point and _get_high_values into top-level scope, then PyPy 
nighly is much slower (89 s vs 16 for CPython). But then if I replace 
itememgetter(x) for _clock and _value definitions with lambda y: x[y], or move 
_clock and _value definitions into top level, than PyPy takes 17 s (and by the way 
PyPy 2.0 and 2.1 take 13 seconds on this last version).
So, one of the reasons for PyPy slowness here might be itemgetter, defined inside 
a hot function.

nosy: +kostia.lopuhin

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list