[pypy-issue] [issue871] almost order of magnitude slower than cpython for a example program

Armin Rigo tracker at bugs.pypy.org
Fri Sep 16 13:20:12 CEST 2011

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

One of the issues is likely the __call__ or the __get__ special methods on the
class 'memoized'.  It makes little sense to have a class here anyway; the
version I post now, solver2.py, is twice as fast on CPython and 4 times as fast
on PyPy.  

The remainder of the difference is probably in the strange use of namedtuples,
which is done with the comment "# Not pretty way to define Vehicle class, but
fast", which usually means "I've taken efforts to make my code unreadable and
slow on PyPy".

nosy: +arigo

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

More information about the pypy-issue mailing list