Message158618
> `buf += data` is noticeably faster `b''.join()` in CPython.
Perhaps because your system's memory allocator is extremely good (or buf is always very small), but b''.join() is far more robust.
Another alternative is accumulating in a bytearray, since it uses overallocation for linear time appending. |
|
Date |
User |
Action |
Args |
2012-04-18 13:23:48 | pitrou | set | recipients:
+ pitrou, loewis, jcea, alanmcintyre, nadeem.vawda, serhiy.storchaka |
2012-04-18 13:23:48 | pitrou | set | messageid: <1334755428.26.0.697893413736.issue14371@psf.upfronthosting.co.za> |
2012-04-18 13:23:47 | pitrou | link | issue14371 messages |
2012-04-18 13:23:47 | pitrou | create | |
|