Issue 22030: Use calloc in set resizing
Issue22030
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.
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) * ![]() |
Date: 2014-07-22 07:32 | |
Victor, how does this look? |
|||
| msg223640 - (view) | Author: STINNER Victor (vstinner) * ![]() |
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) * ![]() |
Date: 2014-07-22 07:49 | |
See also issue #21644 (bytearray). |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:06 | admin | set | github: 66229 |
| 2014-07-22 08:06:02 | rhettinger | set | status: open -> closed resolution: rejected |
| 2014-07-22 07:49:11 | vstinner | set | messages: + msg223641 |
| 2014-07-22 07:42:58 | vstinner | set | messages: + msg223640 |
| 2014-07-22 07:32:08 | rhettinger | create | |
