The Wire · Showcase
GO COMPRESSES RISCV RETURNS, SHAVES 2,700 INSTRUCTIONS
By RepoJournal · Filed · About Go
The Go compiler just cut another 2,700 instructions from binaries on linux/riscv64 by compressing bare function returns.
Joel Sing landed an optimization [1] that replaces JALR instructions used for bare returns with the compressed CJR variant, a safe compression since relocations never attach to bare returns. This is the kind of surgical binary size win that compounds across large deployments. Separately, Robert Griesemer fixed a spec typo [2] that was blocking issue 80784. Both landed in the last 24 hours across 2 commits on the main Go repo.
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
- → Monitor next Go tip release for riscv64 binary improvements golang/go [monitor]
References
- [1] cmd/internal/obj/riscv: compress function returns golang/go
- [2] spec: fix minor typo golang/go