Re:Why does musl make my Rust code so slow? (2020)
by the_mitsuhiko on Tuesday December 12, 2023 @04:26PM
(#38618810)
> Hmm... if the allocator affects performance so much, then maybe the code simply uses the allocator too frequently?
I'm not familiar with musl's allocator so it's hard for me to say anything about it. However what is pretty common is that modern allocators use thread local allocators to avoid hammering global locks too much. Since Rust is very concurrent you don't need too many allocations to benefit from these optimizations.
I'm not familiar with musl's allocator so it's hard for me to say anything about it. However what is pretty common is that modern allocators use thread local allocators to avoid hammering global locks too much. Since Rust is very concurrent you don't need too many allocations to benefit from these optimizations.