Quiz Entry - updated: 2026.09.25
What is Compiler Explorer (godbolt.org), and what is it useful for?
A website that compiles code as you type and shows the resulting assembly side by side, for many languages, compilers and versions, so you can see exactly what the compiler made of your code.
You pick a language (C, C++, Rust, Go and dozens more), a compiler and version (for example x86-64 gcc 13.2 or clang 17), and flags. The source appears on the left, the generated assembly on the right, with matching lines colour-linked. Hovering an instruction explains it.
For IoT and security work this answers questions that are otherwise guesswork:
- Size and speed. On a microcontroller with 32 KB of flash, you can see whether a construct compiles to three instructions or three hundred, and what
-O2versus-Oschanges. - What the optimiser removed. A classic security bug:
memset(key, 0, sizeof key)just before a buffer goes out of scope can be deleted entirely as a "dead store", leaving the secret in memory. In Compiler Explorer you see the call vanish. - Compiler differences. The same code under gcc and clang, or two versions of one, side by side.
- Cross-compilers. ARM and RISC-V compilers are available too, so you can inspect code for the target chip, not just a PC.
Go deeper:
Compiler Explorer — the tool itself; paste a function and change the flags.
CppCon 2017 — Matt Godbolt: What Has My Compiler Done for Me Lately? — the author of Compiler Explorer showing how much work the optimiser does, live in the tool.