Skip to content

Commit 65dcdde

Browse files
committed
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 <[email protected]> Run-TryBot: Michael Pratt <[email protected]> Reviewed-by: Cherry Mui <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent b25dff2 commit 65dcdde

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

doc/go1.21.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,25 @@ <h2 id="runtime-changes">Runtime</h2>
261261

262262
<h2 id="compiler">Compiler</h2>
263263

264+
<p>
265+
Profile-guide optimization (PGO), added as a preview in Go 1.20, is now ready
266+
for general use. PGO enables additional optimizations on code identified as
267+
hot by profiles of production workloads. As mentioned in the
268+
<a href="#go-command">Go command section</a>, PGO is enabled by default for
269+
binaries that contain a <code>default.pgo</code> profile in the main
270+
package directory. Performance improvements vary depending on application
271+
behavior, with most programs from a representative set of Go programs seeing
272+
between 2 and 7% improvement from enabling PGO. See the
273+
<a href="/doc/pgo">PGO user guide</a> for detailed documentation.
274+
</p>
275+
276+
<!-- https://go.dev/issue/59959 -->
277+
<p>
278+
PGO builds can now devirtualize some interface method calls, adding a
279+
concrete call to the most common callee. This enables further optimization,
280+
such as inlining the callee.
281+
</p>
282+
264283
<!-- CL 490819 -->
265284
<p>
266285
<!-- cmd/cgo: reject attempts to declare methods on C types -->

0 commit comments

Comments
 (0)