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 josh.r
Recipients josh.r, pitrou, vstinner
Date 2014-05-02.21:43:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1399067027.98.0.4649821802.issue21419@psf.upfronthosting.co.za>
In-reply-to
Content
And now that I'm thinking about it, the probable cause of the slowdown is that, for any PyLongObject that's smaller than PAGESIZE (give or take), using Calloc means calloc is just calling memset to zero the PyLongObject header and the "used" part of the high order bits along with everything else, where the original Malloc code avoided performing two passes over the memory, initializing each byte in order, and writing each one exactly once. The Calloc approach uses two passes, and the second one isn't wholly sequential, so it may be getting bit by the CPU cache not keeping up.
History
Date User Action Args
2014-05-02 21:43:48josh.rsetrecipients: + josh.r, pitrou, vstinner
2014-05-02 21:43:47josh.rsetmessageid: <1399067027.98.0.4649821802.issue21419@psf.upfronthosting.co.za>
2014-05-02 21:43:47josh.rlinkissue21419 messages
2014-05-02 21:43:47josh.rcreate