From 6e4abe8cef085bf8973479a72e8aead5308cde1c Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Tue, 2 Dec 2025 14:22:34 -0800 Subject: [PATCH] doc: mention stack allocation of slices Very similar to last release's note. Change-Id: Ie7afe21d98cee1c9718e53b20e8af8ee18504bb9 Reviewed-on: https://go-review.googlesource.com/c/go/+/725921 Reviewed-by: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov Reviewed-by: Keith Randall LUCI-TryBot-Result: Go LUCI Auto-Submit: Keith Randall --- doc/next/5-toolchain.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/next/5-toolchain.md b/doc/next/5-toolchain.md index b5893288e5c..523e3f89fbe 100644 --- a/doc/next/5-toolchain.md +++ b/doc/next/5-toolchain.md @@ -1,5 +1,14 @@ ## Compiler {#compiler} + + +The compiler can now allocate the backing store for slices on the stack in more +situations, which improves performance. If this change is causing trouble, the +[bisect tool](https://pkg.go.dev/golang.org/x/tools/cmd/bisect) can be used to +find the allocation causing trouble using the `-compile=variablemake` flag. All +such new stack allocations can also be turned off using +`-gcflags=all=-d=variablemakehash=n`. + ## Assembler {#assembler} ## Linker {#linker}