]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/gc: preallocate slices in noder
authorAriel Mashraki <ariel@mashraki.co.il>
Wed, 9 Oct 2019 21:04:14 +0000 (00:04 +0300)
committerMatthew Dempsky <mdempsky@google.com>
Fri, 11 Oct 2019 18:56:30 +0000 (18:56 +0000)
commit33fac9bad86d7f3bba8926d92c33e5a0cf28061f
tree4fa50ace252e2d27b0d60cb03f187685a7d50293
parent0e3e46f0d741745b6ddd78c05e137d7dd77ace92
cmd/compile/internal/gc: preallocate slices in noder

The slice capacity is known for all these cases. Therefore,
we can initialize them with the desired capacity.

Change-Id: I1835b49108d157203d62e4aa119c2d7ab5e5e46f
Reviewed-on: https://go-review.googlesource.com/c/go/+/200119
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/noder.go