Size-Specialized Memory Allocation

Go 1.27 introduces size-specialized memory allocation for objects under 80 bytes. The runtime uses dedicated functions to optimize these frequent allocations, resulting in 20-30% faster individual operations. This change can make allocation-heavy programs up to 1% faster overall by reducing overhead in the mallocgc path.

Cover image for Size-Specialized Memory Allocation