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.

classification
Title: Use calloc in set resizing
Type: performance Stage: patch review
Components: Versions: Python 3.5
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: vstinner Nosy List: rhettinger, vstinner
Priority: normal Keywords: patch

Created on 2014-07-22 07:32 by rhettinger, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
set_calloc.diff rhettinger, 2014-07-22 07:32 Apply calloc to set resizes review
Messages (3)
msg223638 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2014-07-22 07:32
Victor, how does this look?
msg223640 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-07-22 07:42
Be careful. In my tests, calloc() was slower than malloc() + memset() for
memory blocks smaller than 1 MB. Calloc() can be interesting if only a few
pages (4096 bytes) are modified.

You must provide benchmarks.
msg223641 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-07-22 07:49
See also issue #21644 (bytearray).
History
Date User Action Args
2022-04-11 14:58:06adminsetgithub: 66229
2014-07-22 08:06:02rhettingersetstatus: open -> closed
resolution: rejected
2014-07-22 07:49:11vstinnersetmessages: + msg223641
2014-07-22 07:42:58vstinnersetmessages: + msg223640
2014-07-22 07:32:08rhettingercreate