Open
Description
Summary
Consider the use of a faster allocator such jemalloc or mimalloc
Detailed Explanation
CPython has a custom allocator which is optimized for allocating small objects (PyMalloc), which helps a lot with performance. mimalloc specifically is known to be comparatively fast, and compared to the rest of the executable shouldn't affect binary size too much. This would improve speed when allocating large amounts of heap or just in general.
Drawbacks, Rationale, and Alternatives
An issue could be a larger binary size.
Unresolved Questions
- Which allocator works best for performance (benchmarking this could probably be a good idea)