#2253·bottom

Consider testing alternate allocator with musl builds

Author: ClementTsangCreated Sep 18, 2026Updated Sep 18, 2026
Labelsfeature

Checklist

Describe the feature request

NOTE: The first step is to explore testing whether alternative allocators help first - if the answer is "no" then I'm not going to switch!

Should be easy enough to use something like jemalloc or mimalloc by default for musl builds. As for why, musl's default allocator is (infamously) intentionally very simple, and we may see some benefits from switching (see something like https://nickb.dev/blog/default-musl-allocator-considered-harmful-to-performance/) - though of course, this is something we need to test!

Note that one thing to be careful about is platform support - e.g. see https://github.com/tikv/jemallocator#platform-support.