Get the latest tech news
Default musl allocator considered harmful to performance
In a real world benchmark, the default musl allocator caused a 7x slowdown compared to other allocators. I recommend all Rust projects immediately swap to a different allocator in a musl environment.
To be fair, 45 minutes of that hour was spent fiddling with a C++ dependency’s build system to test if the CPU feature detection was different on musl vs glibc (I never did figure it out). I ran down to the local VPS provider, nabbed a 48 core machine, and crushed its dreams of running anything meaningful with the following benchmark. Andrew Kelley, Zig’s creator, brings up a great discussion point that the underperformance might not be such a big issue to experienced programmers:
Or read this on Hacker News