-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Benchmark with different allocators #1441
Comments
mimalloc vs jemalloc in rustc: rust-lang/rust#62073 |
rustc 1.36.0 (a53f9df32 2019-07-03) Intel(R) Core(TM) i5-4690K CPU @ 3.50GHz Self-reported times
glibc 2.28
jemalloc
mimalloc
`time` data
glibc 2.28
jemalloc
mimalloc
Both allocators are significantly faster than glibc. jemalloc uses slightly more memory, while mimalloc uses significantly more memory than glibc. mimalloc has the fastest overall execution times but jemalloc has the fastest self-reported times, suggesting that mimalloc has less initialization overhead. |
Thanks for those benchmarks @mattico! It indeed seems like For system allocator/jemalloc we already have a feature flag. Performance wise, it looks like jemalloc is a win. However, it is a C library, so building jemalloc is not suuuper easy, so it makes sense to keep the status quo where jemalloc is opt-int |
We might want to revisit this, jemalloc and mimalloc bring the analysis-stats self time from 75.72 s to 72.04 and 71.02 s (my, we're a little slower these days). So still a 5%-ish improvement, but we can build it easily enough. And we can always revert if it causes problems. |
As for the memory usage:
So |
The recent paper about https://github.com/microsoft/mimalloc sounds too good to be true.
It might be a good idea to compare different allocators to see if there are some memory usage wins to have. Better perf would also be helpful, but memory usage is the most important thing
Here's the couple of benchmarks that should be representative (you can use any other large project instead of chalk, for example, rust-analyzer itself):
I think
/usr/bin/time
could be used to compare both time and memory (rss)?We need to compare at least:
The text was updated successfully, but these errors were encountered: