$ the-wire · showcase
GO COMPRESSES RISCV RETURNS, SHAVES 2,700 INSTRUCTIONS
By RepoJournal · Filed · About Go · Composed from the cited sources · methodology
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.
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