The Compiler Explorer Story | Matt Godbolt
ฝัง
- เผยแพร่เมื่อ 26 ส.ค. 2024
- Matt Godbolt recounts the origin story of Compiler Explorer, which started as a tmux session with an editor in one pane and running the compiler in a loop in the other. Compiler Explorer has grown into a publicly available site, serving over 3 million compilations per week.
Clip is from Episode 5 of the Microarch Club Podcast: microarch.club...
Microarch Club: microarch.club/
X / Twitter: / microarchclub
What an inspiring story! Godbolt does not become a verb for no reason. It helps people have a deeper look into what happening under the hood.
Compiler Explorer is amazing. One of the design choices in C++ (and possibly other languages, (Java, Javascript? a long time since I used them)) is where to create your instances. A best practice is where they are used, but what happens if that is in a loop? I always thought that for performance reasons that it would be better to create the instances required in the loop, before entering the loop. Then one day it dawned on me that compilers are pretty smart and I can create the instance within the loop and the compiler will move the creation of the instance to before the loop. Using Compiler Explorer I was surprised the find that the compiler is even smarter than that, as because it knows the instance isn't used outside of the loop, it doesn't need to create the instance at all.
It's so good to hear Australian and English technogists telling their stories in entertaining ways as only they can.
I bet he must hate `consteval`, people not just compiling their code on his AWS instances but also letting it compute stuff 😂
Can we get support for other CPU platforms including ARM and RISC-V targets? That would be super useful.
There is support for both ARM and RISC-V, as far as I know.
WIll you add Sun Studio compilers too? (If it must be, there are Sun Studio compilers for GNU / Linux).
We'll add pretty much anything that installs easily and folks submit a PR for. There's two PRs usually required; one to add the installation to our infra repo and then another to configure it (if it's simple and looks like clang/gcc). If it requires more work there are per compiler customisation points. Google for "how to add a compiler to compiler explorer" if you're interested 🎉