From: David Chase Date: Mon, 20 May 2024 18:21:30 +0000 (-0400) Subject: doc: add release notes for hot block alignment X-Git-Tag: go1.23rc1~265 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1028d973d2854fa3e22d96a0370698e61363a222;p=gostls13.git doc: add release notes for hot block alignment This is for the changes in CL 577935. Change-Id: I8f70dd36c89aaede11a37744c0f279439e01eb13 Reviewed-on: https://go-review.googlesource.com/c/go/+/586895 Reviewed-by: Austin Clements Reviewed-by: Keith Randall LUCI-TryBot-Result: Go LUCI Reviewed-by: Keith Randall --- diff --git a/doc/next/5-toolchain.md b/doc/next/5-toolchain.md index 7f547f686b..8f36239779 100644 --- a/doc/next/5-toolchain.md +++ b/doc/next/5-toolchain.md @@ -9,6 +9,13 @@ The compiler in Go 1.23 can now overlap the stack frame slots of local variables accessed in disjoint regions of a function, which reduces stack usage for Go applications. + +For 386 and amd64, the compiler will use information from PGO to align certain +hot blocks in loops. This improves performance an additional 1-1.5% at +a cost of an additional 0.1% text and binary size. This is currently only implemented +on 386 and amd64 because it has not shown an improvement on other platforms. +Hot block alignment can be disabled with `-gcflags=[=]-d=alignhot=0` + ## Assembler {#assembler} ## Linker {#linker}