Skip to content

Commit

Permalink
doc/go1.21: document PGO GA and devirtualization
Browse files Browse the repository at this point in the history
For #59959.
For #58645.

Change-Id: I574153ef2fd61a5e90ec281fca065c42fce22cc1
Reviewed-on: https://go-review.googlesource.com/c/go/+/498263
Reviewed-by: Eli Bendersky <[email protected]>
Run-TryBot: Michael Pratt <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
  • Loading branch information
prattmic committed Jun 1, 2023
1 parent b25dff2 commit 65dcdde
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions doc/go1.21.html
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,25 @@ <h2 id="runtime-changes">Runtime</h2>

<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 -->
Expand Down

0 comments on commit 65dcdde

Please sign in to comment.