Serhiy Storchaka <storch...@gmail.com> added the comment: > Under Windows (64-bit Windows 7 on a VirtualBox VM), the patch increases > performance slightly but not as much as under Linux:
Thank you, Antoine. This is an expected result. > And the join() approach is 10x faster (!): > C:\t\cpython>pc\VS9.0\amd64\python.exe -m timeit -s "import io; n=2000; > d=[b'a'* > n,b'bb'*n,b'ccc'*n]*1000" "b''.join(d)" > 100 loops, best of 3: 4.63 msec per loop To be fair, test body should be: "s=[]; w=s.append" "for x in d: w(x)" "b''.join(s)" May be tuning resize strategy (overallocate not 1/8, but 1/4, 1/2, or 100%) can help. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15381> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com