If you use Tokio, you should override the default allocator Switching a multi-threaded Rust service on Tokio to tikv-jemallocator as the global allocator cut serialization and deserialization time by more than half at the median and about 40% at p99, according to a guest post by Matthew Pope. Pope's team traced production serde latency that was more than 9× the client-side p50 of the equivalent Java identity operation to contention for the default global allocator, after CPU profiles showed over 40% of production CPU work went to serialization and deserialization. The fix was a two-line change declaring tikv_jemallocator::Jemalloc as the #[global_allocator]. This is a guest post from Matthew Pope. I spend a lot of time telling folks to not use the default allocator, this post captures a lot of the "why." — Russell AI was used to assist with organizing and editing this post, and was especially helpful at criticizing me whenever I contradicted myself. My team is building a multi-threaded Rust service on Tokio. Our serialization and deserialization were many times slower in production than in any benchmark I could run locally, and it was jeopardizing the entire project,