The Wire · Showcase
GO COMMAND GETS PARALLEL TEST PARSING, COMPILER OPTIMIZATIONS CUT BINARY SIZE BY 10K INSTRUCTIONS
By RepoJournal · Filed · About Go
The Go team shipped three heavyweight optimizations overnight that speed up module loading for gopls and shrink binaries across every platform.
Jake Bailey landed parallel test file parsing in cmd/go [2], cutting Windows go list queries for typescript-go from 2.0s to 0.9s by parsing _test.go files concurrently. He also fixed a secondary bottleneck [3] where modload was re-reading directories already filtered by wildcard matching, dropping the same query from 8.6s to 4.3s when local imports are involved. These two changes stack: gopls just got a massive speed bump on the operations it runs thousands of times per day. On the compiler side, Guoqi Chen added the zeroUpperBits attribute to loong64 op definitions [1], mirroring earlier work on other architectures and removing 10,566 instructions from the go binary itself. The same commit shrank compile, asm, cgo, and other tools by 624 to 1,922 instructions each. A new SSA rewrite [4] folds the integer identity x + (y - (x - z)) to y + z, cutting three-instruction sequences to one on arm64 in real-world JSON encoding paths. David Teather reordered the switch arms in readFloat [5] to check digit cases first instead of last, speeding up every float parse by eliminating redundant case checks.
One email a day. Unsubscribe in one click.
Keep up with Go in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Pull latest cmd/go changes if you run gopls or large monorepo workspaces golang/go [plan]
- → Watch for mobile toolchain changes affecting bind and build workflows golang/mobile [monitor]
References
- [1] cmd/compile/internal/ssa: add zeroUpperBits attribute to loong64 op definitions golang/go
- [2] cmd/go: parse test files in parallel golang/go
- [3] cmd/go: avoid re-reading local wildcard matches golang/go
- [4] cmd/compile: fold x + (y - (x - z)) to y + z golang/go
- [5] internal/strconv: check for digits first in readFloat golang/go