aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json/encode.go
diff options
context:
space:
mode:
authorDaniel Martí <mvdan@mvdan.cc>2022-04-21 14:17:40 +0100
committerDaniel Martí <mvdan@mvdan.cc>2022-08-23 18:54:32 +0000
commitef22285f31ab16ff6751418705b8a7df8e0d661f (patch)
tree110375ac9fc1d9f9bcb21e1dbbc3da0ccef96eb2 /src/encoding/json/encode.go
parent7f632f76db65f28038b8797fbfe5e15a9f63e387 (diff)
downloadgo-ef22285f31ab16ff6751418705b8a7df8e0d661f.tar.xz
all: use go/parser.SkipObjectResolution in more places
None of cgo, "go test", nor srcimporter make use of go/ast's object resolution via go/ast.Object. As such, we can skip that work during parse time, which should save some CPU time. We don't have any benchmark numbers, as none of the three packages have any usable benchmarks, but we measured gofmt to be about 5% faster thanks to this tweak in https://go.dev/cl/401454. These three packages are quite different to gofmt, but one can expect similar speed-ups in the 1-5% range. Two notable exceptions, which do make use of go/ast.Object, are cmd/fix and cmd/doc - we do not modify those here. See #46485. Change-Id: Ie3e65600d4790641c4e4d6f1c379be477fa02cee Reviewed-on: https://go-review.googlesource.com/c/go/+/401455 Run-TryBot: Bryan Mills <bcmills@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/encoding/json/encode.go')
0 files changed, 0 insertions, 0 deletions