1
0
mirror of https://github.com/golang/go synced 2024-11-14 15:30:54 -07:00
go/src/reflect
Filip Gruszczyński 6c5a819a5e reflect: add MakeMapWithSize for creating maps with size hint
Providing size hint when creating a map allows avoiding re-allocating
underlying data structure if we know how many elements are going to
be inserted. This can be used for example during decoding maps in
gob.

Fixes #19599

Change-Id: I108035fec29391215d2261a73eaed1310b46bab1
Reviewed-on: https://go-review.googlesource.com/38335
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-04-04 20:01:43 +00:00
..
all_test.go reflect: add MakeMapWithSize for creating maps with size hint 2017-04-04 20:01:43 +00:00
asm_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
asm_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
asm_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
asm_arm64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
asm_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
asm_mips64x.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
asm_mipsx.s reflect: add support for GOARCH=mips{,le} 2016-11-03 23:01:05 +00:00
asm_ppc64x.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
asm_s390x.s reflect: add s390x support 2016-04-06 04:23:06 +00:00
deepequal.go reflect: fix DeepEqual for some cyclic corner cases 2016-10-24 15:20:23 +00:00
example_test.go reflect: add example for StructOf 2016-12-06 20:18:12 +00:00
export_test.go reflect: unexported fields are tied to a package 2016-11-10 14:06:23 +00:00
makefunc.go runtime: clean up and improve reflect.methodValue comments 2016-12-19 21:02:53 +00:00
set_test.go reflect: recognize unnamed directional channels 2016-03-04 20:34:30 +00:00
swapper.go reflect: add Swapper func 2016-09-30 20:26:54 +00:00
tostring_test.go
type.go reflect: fix bucketOf to only look at ptrdata entries in gcdata 2017-02-22 02:19:48 +00:00
value.go reflect: add MakeMapWithSize for creating maps with size hint 2017-04-04 20:01:43 +00:00