]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: drop hash maps after loading
authorCherry Zhang <cherryyz@google.com>
Wed, 29 Jul 2020 23:44:49 +0000 (19:44 -0400)
committerCherry Zhang <cherryyz@google.com>
Mon, 3 Aug 2020 21:12:56 +0000 (21:12 +0000)
commitf204ca305128ad1b500d3ba77aebf5509509a8fc
tree205c38c7b7265ef61027f71d9202ecef2ed10964
parentcecb7a1cf31e8d8991669208e584269db32066c9
[dev.link] cmd/link: drop hash maps after loading

The hash maps are used to deduplicate hashed symbols. Once we
loaded all the symbols, we no longer need the hash maps. Drop
them.

Linking cmd/compile,

name         old live-B     new live-B     delta
Loadlib_GC      13.1M ± 0%     11.3M ± 0%   -13.62%  (p=0.008 n=5+5)

Change-Id: I4bb1f84e1111a56d9e777cd6a68f7d974b60e321
Reviewed-on: https://go-review.googlesource.com/c/go/+/245721
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/link/internal/loader/loader.go
src/cmd/link/internal/loader/loader_test.go