[issue10227] Improve performance of MemoryView slicing

Kristján Valur Jónsson report at bugs.python.org
Thu Sep 8 17:26:59 CEST 2011


Kristján Valur Jónsson <kristjan at ccpgames.com> added the comment:

I'm afraid I had put this matter _far_ out of my head :)  Seeing the amount of discussion on that other defect (stuff I had already come across and scrathced my head over) I think there is a lot of catching up that I'd need to do and I am unable to give this any priority at the moment.
My original patch sought to even out the slicing performance difference between bytes and bytearray.  bytes objects were very streamlined while other were not.

python.exe -m timeit -n 10000000 -s "x = ((b'x'*10000))" "x[:100]"
10000000 loops, best of 3: 0.125 usec per loop

python.exe -m timeit -n 10000000 -s "x = (bytearray(b'x'*10000))" "x[:100]"
10000000 loops, best of 3: 0.202 usec per loop

Did you take a look at this at all?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10227>
_______________________________________


More information about the Python-bugs-list mailing list