]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/internal/goobj2: optimize symbol data access
authorCherry Zhang <cherryyz@google.com>
Fri, 6 Mar 2020 17:36:58 +0000 (12:36 -0500)
committerCherry Zhang <cherryyz@google.com>
Mon, 16 Mar 2020 17:33:24 +0000 (17:33 +0000)
commit3277db4ccfb2e65b147a0c4f85c7ade572b464f9
tree39ba8c7fa1e775a91afd3f9a94757883693b639f
parent3382411d932fb401b88a3b0ce33b74f9a26c8f4d
[dev.link] cmd/internal/goobj2: optimize symbol data access

I wish the compiler inlines the DataOff function and CSEs the
base offset calculation. But it didn't happen. Hand optimize it...

(linking cmd/compile)
Dostkcheck    42.0ms ± 0%    36.1ms ± 2%  -14.07%  (p=0.008 n=5+5)

Change-Id: Iacfbc7243a882158a9a090b7400e216536a311b4
Reviewed-on: https://go-review.googlesource.com/c/go/+/222304
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/internal/goobj2/objfile.go