aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2018-07-18 15:45:56 -0400
committerAustin Clements <austin@google.com>2018-07-18 19:49:09 +0000
commitd2f663c4f241b2f1318f5126c206436afaefdadd (patch)
treeae5619747ce3e28a82d0778202b7c06fb4af2718
parentd0764a248113d3cd616c17723c090aead23daf7f (diff)
downloadgo-d2f663c4f241b2f1318f5126c206436afaefdadd.tar.gz
go-d2f663c4f241b2f1318f5126c206436afaefdadd.zip
doc/go1.11: mention major performance optimizations
Change-Id: I25b93a84996ab1c17d64089b4c2ffabdff3365ec Reviewed-on: https://go-review.googlesource.com/124710 Reviewed-by: Austin Clements <austin@google.com>
-rw-r--r--doc/go1.11.html36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/go1.11.html b/doc/go1.11.html
index f806fe0e03..c62165af4e 100644
--- a/doc/go1.11.html
+++ b/doc/go1.11.html
@@ -317,6 +317,42 @@ func f(v interface{}) {
system calls; fixing this is planned for a future release.
</p>
+<h2 id="performance">Performance</h2>
+
+<p>
+As always, the changes are so general and varied that precise
+statements about performance are difficult to make. Most programs
+should run a bit faster, due to better generated code and
+optimizations in the core library.
+</p>
+
+<h3 id="performance-compiler">Compiler toolchain</h3>
+
+<p><!-- CL 110055 -->
+ The compiler now optimizes map clearing operations of the form:
+</p>
+<pre>
+for k := range m {
+ delete(m, k)
+}
+</pre>
+
+<p><!-- CL 109517 -->
+ The compiler now optimizes slice extension of the form
+ <code>append(s,</code>&nbsp;<code>make([]T,</code>&nbsp;<code>n)...)</code>.
+</p>
+
+<p><!-- CL 100277, CL 105635, CL 109776 -->
+ The compiler now performs significantly more aggressive bounds-check
+ and branch elimination. Notably, it now recognizes transitive
+ relations, so if <code>i&lt;j</code> and <code>j&lt;len(s)</code>,
+ it can use these facts to eliminate the bounds check
+ for <code>s[i]</code>. It also understands simple arithmetic such
+ as <code>s[i-10]</code> and can recognize more inductive cases in
+ loops. Furthermore, the compiler now uses bounds information to more
+ aggressively optimize shift operations.
+</p>
+
<h2 id="library">Core library</h2>
<p>