@@ -317,6 +317,42 @@ <h2 id="runtime">Runtime</h2>
317
317
system calls; fixing this is planned for a future release.
318
318
</ p >
319
319
320
+ < h2 id ="performance "> Performance</ h2 >
321
+
322
+ < p >
323
+ As always, the changes are so general and varied that precise
324
+ statements about performance are difficult to make. Most programs
325
+ should run a bit faster, due to better generated code and
326
+ optimizations in the core library.
327
+ </ p >
328
+
329
+ < h3 id ="performance-compiler "> Compiler toolchain</ h3 >
330
+
331
+ < p > <!-- CL 110055 -->
332
+ The compiler now optimizes map clearing operations of the form:
333
+ </ p >
334
+ < pre >
335
+ for k := range m {
336
+ delete(m, k)
337
+ }
338
+ </ pre >
339
+
340
+ < p > <!-- CL 109517 -->
341
+ The compiler now optimizes slice extension of the form
342
+ < code > append(s,</ code > < code > make([]T,</ code > < code > n)...)</ code > .
343
+ </ p >
344
+
345
+ < p > <!-- CL 100277, CL 105635, CL 109776 -->
346
+ The compiler now performs significantly more aggressive bounds-check
347
+ and branch elimination. Notably, it now recognizes transitive
348
+ relations, so if < code > i<j</ code > and < code > j<len(s)</ code > ,
349
+ it can use these facts to eliminate the bounds check
350
+ for < code > s[i]</ code > . It also understands simple arithmetic such
351
+ as < code > s[i-10]</ code > and can recognize more inductive cases in
352
+ loops. Furthermore, the compiler now uses bounds information to more
353
+ aggressively optimize shift operations.
354
+ </ p >
355
+
320
356
< h2 id ="library "> Core library</ h2 >
321
357
322
358
< p >
0 commit comments