Latest Tech News

Stay updated with the latest in technology, AI, cybersecurity, and more

Filtered by: musl Clear Filter

Default musl allocator considered harmful to performance

TLDR: In a real world benchmark, the default musl allocator caused a 7x slowdown compared to other allocators. I recommend all Rust projects immediately add the following lines to their application’s main.rs : // Avoid musl's default allocator due to lackluster performance // https://nickb.dev/blog/default-musl-allocator-considered-harmful-to-performance #[cfg(target_env = "musl" )] #[global_allocator] static GLOBAL : mimalloc ::MiMalloc = mimalloc::MiMalloc; And Cargo.toml [ target . 'cfg(ta