Skip to content

[RFC] Custom Allocator #5526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
arihant2math opened this issue Feb 17, 2025 · 0 comments · May be fixed by #5678
Open

[RFC] Custom Allocator #5526

arihant2math opened this issue Feb 17, 2025 · 0 comments · May be fixed by #5678
Labels
RFC Request for comments

Comments

@arihant2math
Copy link
Collaborator

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)
@arihant2math arihant2math added the RFC Request for comments label Feb 17, 2025
@arihant2math arihant2math linked a pull request Apr 7, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request for comments
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant