Matt Godbolt
xania.org · Personal blog · on HN since 2012
Matt Godbolt, creator of Compiler Explorer, writes about compiler optimizations, assembly, emulation, and software performance.
What HN saysHN commenters say they learned a lot from it, and cite his posts on SIMD floating point and compiler optimization.
45HN people shared it
12linked it in comments
88stories submitted
3.4Kstory points
3 months agolast shared
2012people per year2026
Most-shared posts
- 1Advent of Compiler Optimisations 20254 people · 392 points · first shared 2025 · 68 comments on HN
- 2How it works: Compiler Explorer4 people · 109 points · first shared 2016 · 25 comments on HN
- 3JavaScript Sega Master System Emulator4 people · 7 points · first shared 2012 · discussion on HN
- 4How Compiler Explorer Works in 20253 people · 243 points · first shared 2025 · 46 comments on HN
- 5Inlining – The Ultimate Optimisation3 people · 6 points · first shared 2025 · discussion on HN
- 6When SIMD Fails: Floating Point Associativity3 people · 5 points · first shared 2025 · discussion on HN
- 7The runtime performance of Rust for a path tracer3 people · 4 points · first shared 2015 · discussion on HN
- 8Happy 10th Birthday Compiler Explorer2 people · 216 points · first shared 2022 · 20 comments on HN
- 9Elite's crazy tokenized string routine2 people · 88 points · first shared 2014 · 17 comments on HN
- 10Emulating a 6502 with cycle-perfect timing2 people · 84 points · first shared 2014 · 20 comments on HN
- 11Pop Goes the Population Count?2 people · 61 points · first shared 2025 · 15 comments on HN
- 12Aliasing2 people · 30 points · first shared 2025 · 2 comments on HN
- 13ARM's Barrel Shifter Tricks2 people · 23 points · first shared 2025 · 1 comments on HN
- 14Unrolling Loops2 people · 18 points · first shared 2025 · discussion on HN
- 15Multiplying our way out of division2 people · 13 points · first shared 2025 · 1 comments on HN
What HN people wrote when they linked it
harerazer · 2023-07-12
I've learned a lot from Matt Godbolt's blog https://xania.org/ . He's the author of Compiler Explorer, also works at https://aquatic.com/.
necubi · 2020-08-06
Godbolt is such an amazing tool, and amazing that it's free.
For a random example from a few days ago, I wanted to understand how Rust compiles various approaches to doing pairwise addition between a f64 vector and a f32 vector: https://godbolt.org/z/9envsT. Profiling can tell me which is fastest, but godbolt is really helpful for understanding why.
(Fun fact I learned recently, after years of using it: Godbolt is named after its creator, Matt Godbolt [0]).
[0] https://xania.org/MattGodbolt
mattgodbolt · 2015-07-07
Weird and wonderful it was, but also amazingly hackable. Using similar tricks to the allocator, I was able to "ROM patch" RISC OS 3.1 to look like 3.5 [1] using only a few bytes of module space. I do miss those days :)
[1]: http://xania.org/201212/finallook-a-risc-os-3.1-hack
Earw0rm · 2025-12-27
That's very much an issue with SIMD, especially where floating point numbers are concerned.
Matt Godbolt wrote about it recently.
https://xania.org/202512/21-vectorising-floats
TLDR, math notation and language specify particular orders in which floating point operations happen, and precision limits of IEEE float representation mean those have to be honoured by default.
Allowing compilers to reorder things in breach of that contract is an option, but it comes with risks.
ForceBru · 2025-12-24
You're probably thinking of another post (https://xania.org/202512/11-pop-goes-the-weasel-er-count) where an entire loop was optimized to a single instruction
xjm · 2025-12-02
Part of the Advent of Compiler Optimisations https://xania.org/AoCO2025
Loving it so far!
repelsteeltje · 2023-11-16
[Knee jerk reaction]
Be careful now. Be very careful.
> Godbolt’s Law — if any single optimisation makes a routine run two or more times faster, then you’ve broken the code.
<https://xania.org/200504/godbolt's-law>
Someone · 2017-06-24
Case in point:
https://xania.org/201405/jsbeeb-getting-the-timings-right-cpu:
"So far so good - it seems unusual to our modern “memory is slow” mindset that the processor touches RAM every cycle, but this is from an age where processors and RAM were clocked at the same speed."
This page also shows that the 6502 happily did extra memory reads.
In fact, the memory had bandwidth to spare. http://www.6502.org/users/andre/osa/oa1.html#hw-io:
"The memory access is twice as fast as the CPU access, so that during Phi2 low the video readout is done and at Phi2 high the usual CPU access takes place"
I remember reading about a setup with two 6502s both running from the same single-ported RAM at full speed, but cannot find it.
samlittlewood · 2016-12-15
Also, look at Matt's write up of how this works:
http://xania.org/201609/how-compiler-explorer-runs-on-amazon
as a pragmatic example (incl. all tools & configs) of how to build an auto scaling & deploying site, without overdosing on kool-aid.
DvdGiessen · 2016-12-15
There's a post on his blog about how the entire thing runs a bunch of compilers on EC2:
http://xania.org/201609/how-compiler-explorer-runs-on-amazon
david-given · 2016-07-18
Here's a description of the file format used by BBC Basic:
http://xania.org/200711/bbc-basic-v-format
That's Basic V, which was the variant used on the ARM-based Archimedes, but it's the same file format as the 6502 machine Basics.
Note that the line numbers used by GOTO and GOSUB were specially flagged --- this was so the RENUMBER command could find them. It also meant that computed gotos weren't renumbered...
(Of course, BBC Basic had proper named procedures and functions with local variables, but all self-respecting Basics had to support GOTO and GOSUB.)
Manishearth · 2015-06-01
http://xania.org/201505/on-rust-performance
(The "faster" bit isn't important; various reasons might have made C++ slower than Rust for this, but what is important is that perf was comparable)