]> Cypherpunks.ru repositories - gostls13.git/commitdiff
doc/go1.21: document PGO GA and devirtualization
authorMichael Pratt <mpratt@google.com>
Thu, 25 May 2023 17:57:25 +0000 (13:57 -0400)
committerMichael Pratt <mpratt@google.com>
Thu, 1 Jun 2023 13:54:10 +0000 (13:54 +0000)
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>

doc/go1.21.html

index 970ff47394b7de2b40ada6043bee7b35f557ca51..9c1383a16f34556787d379de9170db855e55a7c1 100644 (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 -->