- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add mimalloc on feature flag #206
Conversation
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
I think the system linux allocator is pretty good, but perhaps we can use it for musl builds. No strong opinions, though. |
Musl's malloc is indeed very slow compared to glibc, but honestly, I don't think that is a bottleneck, at least I didn't observe that now. Maybe when #175 is implemented it might make a difference. |
Looking at the CI build, looks like it doesn't add much to the binary size (0.1M). BTW, I think we have a couple of C libraries (zstd, libz-ng, xz2, bzip2), not sure whether they use malloc. |
Oh wait, that shouldn't be a problem since mimalloc defines |
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.
LGTM
Just for fun, ran some basic hyperfine benchmarks on linux (pulling the same archive every run, from a localhost server, not from the internet):
|
Looks like cargo-binstall does not allocate/deallocate enough to have heap as a bottleneck. It will also be interesting to run this again once we got #175 |
No description provided.