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
asm_amd64.s
asm_amd64p32.s
asm_arm.s
asm_arm64.s
asm_mips64x.s
asm_mipsx.s reflect: add support for GOARCH=mips{,le} 2016-11-03 23:01:05 +00:00
asm_ppc64x.s
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
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