Size-Specialized Memory Allocation
The Go team says Go 1.27 speeds up memory allocation for objects of 80 bytes or less, with allocations potentially 20–30% faster and allocation-heavy programs up to 1% faster. The runtime adds specialized allocation functions for selected sizes, allowing it to make assumptions that reduce work and improve optimization. Heap allocation flows through mallocgc, while compiler-generated calls to newobject pass the object’s size and whether it contains pointers. Those inputs determine much of the allocator’s work.
AI-written summary, checked against the cited sources. How summaries work