Skip to content

Conversation

arihant2math
Copy link
Collaborator

I measured around a 10% performance improvement on pystones (better benchmarks coming soon).

Fixes: #5526

@youknowone
Copy link
Member

@theoparis Do you have any concern? Please leave a comment if you have opinion about it.

@youknowone youknowone requested a review from coolreader18 April 8, 2025 04:39
@theoparis
Copy link

theoparis commented Apr 8, 2025

The only concern I had was that there is no way to disable mimalloc without modifying rustpython sources after this is merged. I've encountered crashes with jemalloc and chromium's allocator when another allocator is set globally via LD_PRELOAD for example - but maybe this isn't an issue with mimalloc? Other than that I think adding mimalloc is a good idea for performance reasons 👍🏼

@youknowone
Copy link
Member

@theoparis Thank you for explanation. In that case, adding a mimialloc feature will be helpful, right?

@arihant2math
Copy link
Collaborator Author

Not an unreasonable request.
I'll update this.

@arihant2math arihant2math marked this pull request as draft April 8, 2025 17:47
@arihant2math
Copy link
Collaborator Author

I seem to have found a fix, I think I'll just make it environment variable only for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC] Custom Allocator
3 participants