[pypy-issue] [issue1279] Numerical code for list of floats 3x slower than for list of ints.
tracker at bugs.pypy.org
Sat Oct 6 19:00:05 CEST 2012
New submission from Jorge <jorgecanardo at gmail.com>:
The attached file is an extract of a very simple matrix class in Python.
I'm comparing its performance to a similar class in C++ by multiplying 500x500
matrices. Timings were similar when the python matrices had only ints (C++ -O1
0.9 s; PyPy 1.9.0 1.5 s) but using floats in the python side turned the
multiplication over 3 times slower (!), much slower than even -O0. Does this
(As a workaround, I'm using array.array('d', ...), which is actually slightly
faster than the int-only list (1.3 s).)
status: unread -> chatting
PyPy bug tracker <tracker at bugs.pypy.org>
More information about the pypy-issue