-
Notifications
You must be signed in to change notification settings - Fork 59
Add features for alternate global allocators #1411
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
base: main
Are you sure you want to change the base?
Conversation
|
||
option('malloc', | ||
type: 'combo', | ||
choices: ['default', 'mimalloc', 'mimalloc_secure', 'jemalloc'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you able to integrate this into dav1d
's meson
build system, too, so we can more accurately compare them? How difficult is that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using Rust crates for mimalloc and jemalloc so I'd need to figure out how to link them.
I guess I can try
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's difficult, we can merge this in as is—it's still useful—but it'd be even nicer to be able to compare to dav1d
with the same allocator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@frc4533-lincoln, is it difficult? Should we just merge this in as is and add it to dav1d
later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@frc4533-lincoln, I can merge this, but I don't have permission to git push --force
after rebasing.
Given that the global allocator is usually decided by the application, and not a library, not sure if this should be eligible for the performance bounty -- this doesn't directly contribute to rav1d performance relative to dav1d. Though it will still be interesting to see what the performance difference will be like! |
@djc Yeah, that's fine. |
Just to let you know, we did discuss this separately beforehand and I clarified that changing the allocator wouldn't be eligible for the performance bounty, but that it could still be useful as a way to potentially uncover memory-related performance bottlenecks. |
This PR adds features for switching the global allocator to mimalloc, mimalloc secure mode, or jemalloc.
As for why these two:
PartitionAlloc (used in Chrome) doesn't have Rust bindings, but I could write some if that'd be useful.