Message217799
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. |
|
Date |
User |
Action |
Args |
2014-05-02 21:43:48 | josh.r | set | recipients:
+ josh.r, pitrou, vstinner |
2014-05-02 21:43:47 | josh.r | set | messageid: <1399067027.98.0.4649821802.issue21419@psf.upfronthosting.co.za> |
2014-05-02 21:43:47 | josh.r | link | issue21419 messages |
2014-05-02 21:43:47 | josh.r | create | |
|