3 hours ago · Tech · hide

In the previous article , we made Go code faster by changing how it computes. SIMD lets one CPU instruction work on several values at once, and the simd/archsimd and simd packages give Go access to it. Our dot product ran about 9 times faster, but the code got a lot harder to read. At the end, I promised another route to speed, one where you don’t rewrite anything. That route is Profile-Guided Optimization (PGO). You record a CPU profile of where your program spends its time and give it back to the compiler, so it can work harder on the code that is actually hot. Your source stays exactly as it was. We briefly saw it in the IR post , and today we’re going deep into it.

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town