diff options
| author | Cherry Zhang <cherryyz@google.com> | 2020-09-28 13:10:30 -0400 |
|---|---|---|
| committer | Cherry Zhang <cherryyz@google.com> | 2020-09-29 17:25:24 +0000 |
| commit | 66770f4b1de37d9c5c962edb2980a70102e09ec3 (patch) | |
| tree | 80d377665152e21785b1312463a54d2852e35026 /src/cmd/link/internal/loader | |
| parent | 39dde09126be02f5f8c38ddf7590ae8f9825fcaa (diff) | |
| download | go-66770f4b1de37d9c5c962edb2980a70102e09ec3.tar.xz | |
cmd/compile: mark type namedata symbols content-addressable
Type namedata symbols are for type/field/method names and package
paths. We can use content-addressable symbol mechanism for them.
Change-Id: I923fda17b7094c7a0e46aad7c450622eb3826294
Reviewed-on: https://go-review.googlesource.com/c/go/+/257960
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Diffstat (limited to 'src/cmd/link/internal/loader')
| -rw-r--r-- | src/cmd/link/internal/loader/loader.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/link/internal/loader/loader.go b/src/cmd/link/internal/loader/loader.go index ea99233f67..4025edc23f 100644 --- a/src/cmd/link/internal/loader/loader.go +++ b/src/cmd/link/internal/loader/loader.go @@ -2153,11 +2153,11 @@ func (l *Loader) LoadNonpkgSyms(arch *sys.Arch) { l.npkgsyms = l.NSym() // Preallocate some space (a few hundreds KB) for some symbols. // As of Go 1.15, linking cmd/compile has ~8000 hashed64 symbols and - // ~13000 hashed symbols. + // ~27000 hashed symbols. st := loadState{ l: l, hashed64Syms: make(map[uint64]symAndSize, 10000), - hashedSyms: make(map[goobj.HashType]symAndSize, 15000), + hashedSyms: make(map[goobj.HashType]symAndSize, 30000), } for _, o := range l.objs[goObjStart:] { st.preloadSyms(o.r, hashed64Def) |
