-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 feature for using jemalloc allocator. #1269
Conversation
Wow - nice. Wouldn't have expected it to make a huge difference for I actually have a bit of experience with this type of change (https://dev.to/sharkdp/an-unexpected-performance-regression-11ai) from the
If it's similar as for
Unfortunately, it turned out that there is a problem with It also turns out the |
👍
That is pretty unfortunate... I also don't have a system running Catalina to test it, either. If we can't test it, should we close this, or merge it and let distro maintainers opt-in as needed? They would likely know how jemalloc runs in their own environment better than anyone.
I'm not too surprised about that, since there's a lot of variables at play and all. I'm definitely glad I chose to make it an optional feature, though. |
Hm, interesting. I don't see any significant performance difference when using jemalloc except for the
We know from our profiling results that the majority of the time in the |
I'm inclined to close this for now, unless we are sure that Having an optional If there are definite performance improvements, on the other hand, I'm happy to merge this. |
Closing this for now, but happy to reopen if someone wants to make progress on this. |
After doing a bit of research and testing, I added the
allocator-jemalloc
feature. This feature replaces the system allocator with jemalloc. It noticeably improves the startup performance (#951) on my computer (MacOS Mojave), but I'm not sure if it will help too much with other non-Mac platforms.Benchmark:
Left: Jemalloc
Right: System allocator (bat release build from current master)
Note 1:
I would like to make it a default on MacOS, but that's a nightly-only cargo feature.
rust-lang/cargo#1197 (comment)
Note 2:
We should probably find a way to notify the bat Homebrew maintainers once this lands in a release.