runtime: skip wb call in growslice when unnecessary
Instrumenting make.bash reveals that almost half (49.54%) of the >16 million calls to growslice for pointer-containing slices are growing from an empty to a non-empty slice. In that case, there is no need to call the write barrier, which does some work before discovering that no pointers need shading. Change-Id: Ide741468d8dee7ad43ea0bfbea6ccdf680030a0f Reviewed-on: https://go-review.googlesource.com/c/go/+/168959 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Showing
Please register or sign in to comment