cmd/compile: add size hint to map literal allocations
Might as well tell the runtime how large the map is going to be. This avoids grow work and allocations while the map is being built. Will wait for 1.8. Fixes #15880 Fixes #16279 Change-Id: I377e3e5ec1e2e76ea2a50cc00810adda20ad0e79 Reviewed-on: https://go-review.googlesource.com/23558 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Showing
Please
register
or
sign in
to comment