STINNER Victor added the comment: (Oops, I attached the wrong patch, fixed in patch v2.)
Quick & dirty micro-benchmark: Original: $ ./python -m timeit -s 'lst=list("hello")' 'lst[2]' 10000000 loops, best of 3: 0.0261 usec per loop Patched: $ ./python -m timeit -s 'lst=list("hello")' 'lst[2]' 10000000 loops, best of 3: 0.0186 usec per loop ---------- Added file: http://bugs.python.org/file41834/binary_subscr-2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26301> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com