aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/internal
diff options
context:
space:
mode:
authorMartin Möhrmann <moehrmann@google.com>2018-06-16 01:22:07 +0200
committerMartin Möhrmann <moehrmann@google.com>2018-10-15 18:23:03 +0000
commit9f66b41beea82cc613cad9138c10a50f2b3ea137 (patch)
tree79418af1891feb7b25952054d3ef04d284bc6f97 /src/runtime/internal
parentc9130cae9a9cd59178e842851f3f30b1d97ab0bd (diff)
downloadgo-9f66b41beea82cc613cad9138c10a50f2b3ea137.tar.xz
cmd/compile: avoid implicit bounds checks after explicit checks for append
The generated code for the append builtin already checks if the appended to slice is large enough and calls growslice if that is not the case. Trust that this ensures the slice is large enough and avoid the implicit bounds check when slicing the slice to its new size. Removes 365 panicslice calls (-14%) from the go binary which reduces the binary size by ~12kbyte. Change-Id: I1b88418675ff409bc0b956853c9e95241274d5a6 Reviewed-on: https://go-review.googlesource.com/c/119315 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/internal')
0 files changed, 0 insertions, 0 deletions