DigiNews

Tech Watch by Johan Denoyer

← Back to articles

Size-Specialized Memory Allocation

Quality: 9/10 Relevance: 9/10

Summary

Go 1.27 introduces size-specialized memory allocation, accelerating allocations of 80 bytes or fewer and delivering up to 20-30% faster malloc calls and potential 1% gains for allocation-heavy workloads. The post explains how size classes and span classes drive specialized mallocgc variants, the trade-offs with instruction cache size, and compiler optimizations like inlining and constant-time clears to boost small allocations. It also covers benchmarking considerations, practical implications for developers, and how to enable or disable the feature.

🚀 Service construit par Johan Denoyer