Antoine Pitrou added the comment: Other benchmarks for the new patch (exercising FIFO-like behaviour: some data is appended at one end, and popped at the other):
timeit -s "b=bytearray(100000);s=b'x'*100" "b[:100] = b''; b.extend(s)" -> before: 4.07 usec per loop -> after: 0.812 usec per loop For comparison, popping from the end (LIFO-like): timeit -s "b=bytearray(100000);s=b'x'*100" "b[-100:] = b''; b.extend(s)" -> before: 0.894 usec per loop -> after: 0.819 usec per loop ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19087> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com