use go/parser.SkipObjectResolution
We don't use go/ast.Objects, as we use go/types instead. Avoiding this work saves a bit of CPU and memory allocs. name old time/op new time/op delta Build-16 10.2s ± 1% 10.2s ± 1% ~ (p=0.937 n=6+6) name old bin-B new bin-B delta Build-16 5.47M ± 0% 5.47M ± 0% ~ (all equal) name old cached-time/op new cached-time/op delta Build-16 328ms ±14% 321ms ± 6% ~ (p=0.589 n=6+6) name old mallocs/op new mallocs/op delta Build-16 34.8M ± 0% 34.0M ± 0% -2.26% (p=0.010 n=6+4) name old sys-time/op new sys-time/op delta Build-16 5.89s ± 3% 5.89s ± 3% ~ (p=0.937 n=6+6) See golang/go#52463.pull/549/head
parent
d6afdd08bb
commit
d18dd73556
Loading…
Reference in New Issue