1
0
mirror of https://github.com/golang/go synced 2024-11-12 13:10:33 -07:00
go/src/cmd/compile
Martin Möhrmann 6c102e141c 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>
2017-09-06 04:38:12 +00:00
..
internal cmd/compile: avoid stack allocation of a map bucket for large constant hints 2017-09-06 04:38:12 +00:00
doc.go cmd/compile: add mutex profiling support 2017-04-05 22:10:54 +00:00
fmt_test.go all: remove some double spaces from comments 2017-08-26 15:09:09 +00:00
main.go cmd/internal/objabi: extract shared functionality from obj 2017-04-19 00:00:09 +00:00