[pypy-issue] [issue1631] array.tostring() is 15x slower on PyPy

Alex Gaynor tracker at bugs.pypy.org
Tue Nov 5 19:15:19 CET 2013


New submission from Alex Gaynor <alex.gaynor at gmail.com>:

~/p/pypy $ ./pypy-c  -mtimeit -s "from array import array; x = array('B', '*' * 
100000)" "x.tostring()"
10000 loops, best of 3: 60.5 usec per loop
~/p/pypy $ ./pypy-c  -mtimeit -s "from array import array; x = array('B', '*' * 
100000)" "x.tostring()"                 🕑 2.58s
10000 loops, best of 3: 60.3 usec per loop
~/p/pypy $ ./pypy-c  -mtimeit -s "from array import array; x = array('B', '*' * 
100000)" "x.tostring()"                 🕒 2.57s
10000 loops, best of 3: 60.5 usec per loop
~/p/pypy $ ./pypy-c  -mtimeit -s "from array import array; x = array('B', '*' * 
100000)" "x.tostring()"                 🕒 2.56s
10000 loops, best of 3: 60.8 usec per loop
~/p/pypy $ ./pypy-c  -mtimeit -s "from array import array; x = array('B', '*' * 
100000)" "x.tostring()"                 🕑 2.57s
10000 loops, best of 3: 60.6 usec per loop
~/p/pypy $                                                                                                              
🕑 2.56s
~/p/pypy $
~/p/pypy $
~/p/pypy $ python  -mtimeit -s "from array import array; x = array('B', '*' * 
100000)" "x.tostring()"
100000 loops, best of 3: 3.97 usec per loop
~/p/pypy $ python  -mtimeit -s "from array import array; x = array('B', '*' * 
100000)" "x.tostring()"                   🕔 1.73s
100000 loops, best of 3: 4.03 usec per loop
~/p/pypy $ python  -mtimeit -s "from array import array; x = array('B', '*' * 
100000)" "x.tostring()"                   🕛 1.69s
100000 loops, best of 3: 3.98 usec per loop
~/p/pypy $ python  -mtimeit -s "from array import array; x = array('B', '*' * 
100000)" "x.tostring()"                   🕛 1.70s
100000 loops, best of 3: 4.19 usec per loop
~/p/pypy $ python  -mtimeit -s "from array import array; x = array('B', '*' * 
100000)" "x.tostring()"                   🕐 1.73s
100000 loops, best of 3: 4.14 usec per loop

----------
messages: 6300
nosy: agaynor, pypy-issue
priority: performance bug
status: unread
title: array.tostring() is 15x slower on PyPy

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


More information about the pypy-issue mailing list