From 2f8cb02b82a72c7288fe4f1e4372c0e6c4da2bcb Mon Sep 17 00:00:00 2001 From: Michael Anthony Knyszek Date: Mon, 8 Dec 2025 22:12:15 +0000 Subject: _content/doc/go1.26.md: add entry for size-specialized malloc Change-Id: Ib41e2935a04c01d4f12f64cfedccb476a9b9529d Reviewed-on: https://go-review.googlesource.com/c/website/+/728400 Auto-Submit: Michael Knyszek Reviewed-by: David Chase LUCI-TryBot-Result: Go LUCI --- _content/doc/go1.26.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/_content/doc/go1.26.md b/_content/doc/go1.26.md index 6d60ed09..c4261ac2 100644 --- a/_content/doc/go1.26.md +++ b/_content/doc/go1.26.md @@ -99,6 +99,19 @@ performance or behavior, please [file an issue](/issue/new). The baseline runtime overhead of cgo calls has been reduced by ~30%. +### Faster memory allocation + + + +The compiler will now generate calls to size-specialized memory allocation +routines, reducing the cost of some small (<512 byte) memory allocations by +up to 30%. +Improvements vary depending on the workload, but the overall improvement is +expected to be ~1% in real allocation-heavy programs. +Please [file an issue](/issue/new) if you notice any regressions. +You may set `GOEXPERIMENT=nosizespecializedmalloc` at build time to disable +it. + ### Goroutine leak profiles {#goroutineleak-profiles} -- cgit v1.3