Compiler Explorer
@compiler-explorer.com
1.3K followers 30 following 14 posts
A website for exploring the output of compilers. aka godbolt.org Supports C, C++, Rust, Fortran, COBOL and many many more. Support us at https://patreon.com/mattgodbolt
Posts Media Videos Starter Packs
Pinned
compiler-explorer.com
CE relies on your support! How you can help:

* Submit PRs & report issues: github.com/compiler-exp...
* Become a Patron: patreon.com/mattgodbolt
* Sponsor us: github.com/sponsors/com...
* Buy CE swag: shop.compiler-explorer.com
* Join our Discord: discord.gg/B5WacA7
github.com
compiler-explorer.com
And we're back. A temporary misconfiguration - we have fixed it and all is well..sorry for the problem! -mg
compiler-explorer.com
Investigating why Windows compilers are down! Watch this space, and sorry for any inconvenience -mg
Reposted by Compiler Explorer
matt.godbolt.org
LLM-explanation is now live in @compiler-explorer.com - An example: compiler-explorer.com/z/rvvx7MxKq

* LLMs make mistakes and are overconfident
* We'll never force LLMs or AI on you, it's opt in (like clang-tidy, PVS Studio or other tools)
* It is *beta* quality

Initial results are promising(1/3)
Compiler Explorer - C++ (x86-64 clang 21.1.0)
// setup constexpr auto valid_chars = "0123456789abcdef"; bool is_valid_id(std::string_view maybe_id) { if (maybe_id.size() != 16) { return false; } if (maybe_id.find_first_not_of(valid_ch...
explain.compiler-explorer.com
Reposted by Compiler Explorer
matt.godbolt.org
@compiler-explorer.com is now running with a completely new storage mechanism in the back end. It's taken me quite a long time to get to the point where I felt confident enough to switch over to it and it seems like it's gone without a hitch. Details:
xania.org/202509/cefs
CEFS: Finally Solving CE's Mount(ing) Problems — Matt Godbolt’s blog
In which CE's boot times are finally brought under control
xania.org
Reposted by Compiler Explorer
matt.godbolt.org
Hey folks! @compiler-explorer.com is free & open for everyone, but if you're planning to use our API for bulk executions though, please ping us! CE is a shared resource and heavy use can slow things down for the whole community. DM me to chat - happy to help figure out what works for everyone! :)
compiler-explorer.com
Support friend of the site Jason by going to one of his excellent courses! Jason was instrumental in publicising CE in the early days and his courses are awesome too! -mg
lefticus.bsky.social
Come to one of my highly interactive and dynamic C++ Best Practices conference workshops this year at CppCon (Sept 13-14) or NDC TechTown (Sept 22-23)

Only about 4 weeks left!

ndctechtown.com/workshops/c-...

cppcon.org/class-2025-b...
C++ Best Practices | NDC TechTown 2025
This is a 2-day workshop that explores Best Practices as they apply to C++.
ndctechtown.com
compiler-explorer.com
CE relies on your support! How you can help:

* Submit PRs & report issues: github.com/compiler-exp...
* Become a Patron: patreon.com/mattgodbolt
* Sponsor us: github.com/sponsors/com...
* Buy CE swag: shop.compiler-explorer.com
* Join our Discord: discord.gg/B5WacA7
github.com
Reposted by Compiler Explorer
matt.godbolt.org
I've been getting more anecdotal reports that @compiler-explorer.com is slow. Seems to be folks' simple code taking a while, likely queued up behind a longer compile. We've done some digging and it seems to have gotten worse since December last year. Doesn't seem to be bot traffic. Have you noticed?
compiler-explorer.com
Huge news! AWS has approved Compiler Explorer for their Open Source Credits program, covering our infrastructure costs for the next year!
Thank you AWS for supporting open source! This means faster compiles, better queuing & more improvements coming. Exciting times ahead!
Reposted by Compiler Explorer
matt.godbolt.org
I'm frequently asked "how much does @compiler-explorer.com cost to run". I've done some digging and posted xania.org/202506/compi... which is a high-level breakdown of the costs (and revenue); and links to a more in depth report if you want all the gory details.
Compiler Explorer Cost Transparency — Matt Godbolt’s blog
In which I try and show how we spend your kind Patreon donations
xania.org
Reposted by Compiler Explorer
matt.godbolt.org
I'm half way through my career break, and taking stock. Plan was to do conf talks (check), work on @compiler-explorer.com (check), spend time with family (sort of) and even do some hobby code (also sort of). Higher level goal still is to get CE "on its feet" a bit...
Reposted by Compiler Explorer
matt.godbolt.org
Experimenting with something like this for @compiler-explorer.com - wondering what your thoughts are? AI is getting everywhere, and can be divisive. I'm hoping something like this - so long as I can get the output quality high enough - is a net benefit to help folks learn more about their code.
A screenshot of Compiler Explorer showing an "AI Explain this" view. The source code is: 

bool isspc(char c) { 
    return c == '\n' || c == '\r' || c == '\t' || c == ' ';
}

The asm is:
isspc(char):
        mov     ecx, edi
        cmp     cl, 33
        setb    dl
        movabs  rax, 4294977024
        shr     rax, cl
        and     al, dl
        ret

Below is a "Claude Explain" window with:

The function isspc(char) is compiled to an efficient bit manipulation technique to check for whitespace characters. Let's break down the assembly instructions:

mov ecx, edi

Copies the input character from the edi register (first function argument) to ecx
cl will contain the lowest 8 bits (the character)
cmp cl, 33

Compares the character against decimal 33
This is a preliminary check to quickly filter out non-whitespace characters
setb dl

Sets the dl register to 1 if the character is below 33 (space, tab, newline, etc.)
Uses a conditional set instruction
movabs rax, 4294977024

Loads a pre-computed 64-bit constant
This constant represents a bit mask for whitespace detection
shr rax, cl

Shifts the bit mask right by the character's value
This dynamically positions the mask based on the input character
and al, dl

Performs a bitwise AND between the shifted mask and the previous condition
Produces the final boolean result in al
ret

Returns the result (0 or 1) in al
This implementation is a highly optimized branchless method for checking whitespace characters, using bit manipulation instead of multiple comparisons. It avoids conditional jumps, which can be slower on modern CPUs.

The code checks for space (' '), newline ('\n'), carriage return ('\r'), and tab ('\t') in a single, efficient operation.
Reposted by Compiler Explorer
matt.godbolt.org
Thrilled to share that @compiler-explorer.com has received a $10K grant from NVIDIA's FOSS Fund! This support will help keep our GPU instances running and allow developers worldwide to experiment with CUDA code. Thank you NVIDIA AI Dev for supporting open source tools! #NVIDIAGrant
Reposted by Compiler Explorer
compiler-explorer.com
Does passing `-m32` to generate 32-bit code work? -mg
compiler-explorer.com
This is what I'm seeing anyway, as I'd expect. -mg
A screenshot of the site showing all the x86 gccs
compiler-explorer.com
I see them; can you elaborate on what you're seeing?
compiler-explorer.com
First I've heard that it's not there

...taking a look -mg
compiler-explorer.com
We just blocked a TW-based IPv6 address from making many many back-to-back requests, most of which seemed to hit our caches (and thus were duplicates). If this affected you, please DM us or reply and we can help diagnose what went wrong. -mg
compiler-explorer.com
Compiler Explorer in 2024!

0.017 cents per compilation for 190M compilations. Tons of new features, Matt takes stock:

www.patreon.com/posts/compil...
Compiler Explorer in 2024 | Matt Godbolt
Get more from Matt Godbolt on Patreon
www.patreon.com
Reposted by Compiler Explorer
matt.godbolt.org
Sent my first proper Patreon/GitHub sponsor update for @compiler-explorer.com work today. Surreal experience, I'm kinda giving my first update to my new boss(es) :-)