doc/go1.21: document PGO GA and devirtualization

For #59959.
For #58645.

Change-Id: I574153ef2fd61a5e90ec281fca065c42fce22cc1
Reviewed-on: https://go-review.googlesource.com/c/go/+/498263
Reviewed-by: Eli Bendersky <eliben@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Michael Pratt 2023-05-25 13:57:25 -04:00
parent b25dff2efe
commit 65dcddeb4e
1 changed files with 19 additions and 0 deletions

View File

@ -261,6 +261,25 @@ Do not send CLs removing the interior tags from such phrases.
<h2 id="compiler">Compiler</h2>
<p>
Profile-guide optimization (PGO), added as a preview in Go 1.20, is now ready
for general use. PGO enables additional optimizations on code identified as
hot by profiles of production workloads. As mentioned in the
<a href="#go-command">Go command section</a>, PGO is enabled by default for
binaries that contain a <code>default.pgo</code> profile in the main
package directory. Performance improvements vary depending on application
behavior, with most programs from a representative set of Go programs seeing
between 2 and 7% improvement from enabling PGO. See the
<a href="/doc/pgo">PGO user guide</a> for detailed documentation.
</p>
<!-- https://go.dev/issue/59959 -->
<p>
PGO builds can now devirtualize some interface method calls, adding a
concrete call to the most common callee. This enables further optimization,
such as inlining the callee.
</p>
<!-- CL 490819 -->
<p>
<!-- cmd/cgo: reject attempts to declare methods on C types -->