Go: Optimizer Wizardry and RISC-V Speed Boosts
Today's Go development showcased impressive compiler optimizations and performance improvements. The prove pass got smarter with multiple optimization commits from Jorropo, while Julian Zhu delivered significant performance gains for RISC-V users with new assembly functions. The team also improved tooling consistency and added long-awaited example support to go doc.
Duration: PT3M47S
https://podlog.io/listen/go-e282e2e6/episode/go-optimizer-wizardry-and-risc-v-speed-boosts-f96165ca
Transcript
Hey there, fellow gophers! Welcome back to your daily dose of Go goodness. I'm your host, and wow, do we have some fascinating developments to dig into today, March 28th, 2026.
You know that feeling when you optimize a piece of code and suddenly everything just runs smoother? Well, the Go team has been having that feeling a lot lately, because today we're looking at 19 commits that are all about making things better, faster, and more consistent.
Let me start with what's got me genuinely excited - we've got some serious compiler optimization magic happening. Jorropo has been on an absolute tear with the prove pass, which is the part of the compiler that figures out what it can safely optimize based on what it knows about your code. They've landed not one, not two, but three commits that are making the compiler smarter about removing unnecessary operations.
The coolest part? One of these optimizations removes no-op And operations, and get this - it triggered 308 times when building the standard library alone! That's 308 places where the compiler is now smart enough to say "hey, this And operation isn't actually doing anything, let me just remove it for you." Jorropo mentioned this was originally aimed at cryptographic code that uses And to implement modulus operations, but it's helping all over the place, especially in defer-generated code.
Then we've got Julian Zhu delivering some serious performance wins for our RISC-V friends. They've added assembly implementations for the Exp and Exp2 math functions, and the numbers are beautiful - we're talking 22% faster for Exp and 27% faster for Exp2. If you're running Go on RISC-V hardware, your math-heavy code just got a nice little birthday present.
But it's not just about raw performance today. Nick White tackled something that developers have been asking for since 2018 - better example support in the go doc command. You can now use the -ex flag to list executable examples, and even better, you can pass an example name and see both the code and expected output right there in your terminal. No more jumping between your terminal and the browser just to check how an example works.
Speaking of developer experience, yongqijia fixed one of those little inconsistencies that probably bugged someone every single day. You know how gofmt -d exits with status 1 when it finds diffs? Well, go fix -diff wasn't doing the same thing, which meant scripts couldn't easily detect when fixes were needed. Now it does, and everything feels just a little more predictable.
The housekeeping side saw Tobias Klauser cleaning up by removing the dead OpenBSD MIPS64 port. It's always bittersweet to see a port go, but removing unused code means less maintenance burden and cleaner builds for everyone else.
And in the security department, Roland Shoemaker tightened up the crypto package by preventing registration of hash value 0, which is used as a sentinel for "no hash." It's a small change, but it prevents a potential footgun.
Keith Randall wrapped up some codegen testing improvements, making sure the MIPS64 tests only check for hardware instructions when we're actually using hard float. It's the kind of attention to detail that makes the Go toolchain rock solid across all these different architectures.
Today's focus should be on appreciating how these seemingly small optimizations compound. That prove pass work isn't just academic - it's making your binaries smaller and faster without you having to change a single line of code. And if you haven't played with the new go doc -ex flag yet, give it a try on your next coffee break.
Keep shipping, keep learning, and remember - every small optimization matters. Catch you tomorrow for another round of Go discoveries!