← Back to Resources
Open Source NewsSeptember 16, 20262 min read

Size-Specialized Memory Allocation

By BIOS Founding Team

Size-Specialized Memory Allocation

This Go blog post details a Go 1.27 runtime optimization that speeds up allocations of 80 bytes or fewer by roughly 20-30% using size-specialized mallocgc variants generated per size class.

When the compiler knows the target span class at compile time, it can call these specialized functions directly, benefiting common small allocations like interfaces, strings, and slices.

Full details: https://go.dev/blog/size-specialized-allocations