This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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)
History
Date User Action Args
2011-11-25 00:52:33pitrousetrecipients: + pitrou, eli.bendersky, flox, dmalcolm, neologix, python-dev, kaifeng
2011-11-25 00:52:33pitrousetmessageid: <1322182353.3.0.939754541302.issue11849@psf.upfronthosting.co.za>
2011-11-25 00:52:32pitroulinkissue11849 messages
2011-11-25 00:52:32pitroucreate