cmd/compile: avoid stack allocation of a map bucket for large constant hints
runtime.makemap will allocate map buckets on the heap for hints larger than the number of elements a single map bucket can hold. Do not allocate any map bucket on the stack if it is known at compile time that hint is larger than the number of elements one map bucket can hold. This avoids zeroing and reserving memory on the stack that will not be used. Change-Id: I1a5ab853fb16f6a18d67674a77701bf0cf29b550 Reviewed-on: https://go-review.googlesource.com/60450 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Showing
Please register or sign in to comment