Message148297
| Author |
pitrou |
| Recipients |
dmalcolm, eli.bendersky, flox, kaifeng, neologix, pitrou, python-dev |
| Date |
2011年11月25日.00:52:32 |
| SpamBayes Score |
0.00024113272 |
| Marked as misclassified |
No |
| Message-id |
<1322182353.3.0.939754541302.issue11849@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
More surprising is that, even ignoring the allocation cost, other operations on the memory area seem more expensive:
$ ./python -m timeit -s "b=bytearray(500000)" "b[:] = b"
-> python 3.3:
1000 loops, best of 3: 367 usec per loop
-> python 3.2:
10000 loops, best of 3: 185 usec per loop
(note how this is just a dump memcpy) |
|