Author serhiy.storchaka
Recipients Arfrever, eli.bendersky, jcon, meador.inge, ncoghlan, pitrou, serhiy.storchaka, tshepang
Date 2012-07-20.20:48:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> 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.
Date User Action Args
2012-07-20 20:48:26serhiy.storchakasetrecipients: + serhiy.storchaka, ncoghlan, pitrou, Arfrever, eli.bendersky, meador.inge, tshepang, jcon
2012-07-20 20:48:26serhiy.storchakasetmessageid: <>
2012-07-20 20:48:26serhiy.storchakalinkissue15381 messages
2012-07-20 20:48:25serhiy.storchakacreate