#compilerexplorer — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #compilerexplorer, aggregated by home.social.
-
A new #FreePascal lesson, thanks to #CompilerExplorer.
Incrementing a number by an ordinal can be done in a few ways in Free Pascal, but they result in a different number of lines of x86_64 assembly.
Let's say we want to increment
iby 1.PASCAL:
i := i + 1; // ... and ...
i += 1; // produce identical assembly
ASSEMBLY:
movl -16(%rbp),%eax
leal 1(%eax),%eax
movl %eax,-16(%rbp)However...
PASCAL:
Inc(i);
ASSEMBLY:
addl $1,-16(%rbp)Granted, this might be before any optimisation takes place, but it's still very interesting to see!
I hadn't realised before today that
Inc()will work with numbers other than one. So...PASCAL:
Inc(i, 2);
ASSEMBLY:
addl $2,-16(%rbp)It will also work with variables.
Let's say we want to increment
ibyAInt, an incoming argument.PASCAL:
i := i + AInt; // ... and ...
i += AInt; // produce identical assembly
ASSEMBLY:
movl -16(%rbp),%eax
movl -8(%rbp),%edx
leal (%eax,%edx),%eax
movl %eax,-16(%rbp)However...
PASCAL:
Inc(i, AInt);
ASSEMBLY:
movl -8(%rbp),%eax
addl %eax,-16(%rbp) -
Playing with #FreePascal in #CompilerExplorer.
Lines 22 and 23 produce less machine code than lines 25 and 26, yet end up with the same result - trimming the last character from the last item in a TStringList.
-
Also, I wonder how this stuff smashes into the automagic #SIMD-ification that modern compilers do. I'm not sure that those expose carry flags. I suppose I need to fling a test case at #CompilerExplorer. Also, I wish it was called #CompilerExploder. 5/4
-
-
Ever wanted to know who's that great chap running Compiler Explorer? Mike Godbolt gave a talk:
-
[#Compiler] Day 1 of #AoCO2025 Study Notes
While the original uses #CompilerExplorer, I wanted to replicate the analysis locally.
In this post, I have used #gcc, #clang, llvm-objdump and #LLDB to analyze.
Read more here: https://gapry.github.io/2026/01/01/Advent-of-Compiler-Optimisations-Study-Notes-01.html
-
RE: https://hachyderm.io/@mattgodbolt/115689717135274179
Another #AbsoluteBanger from @mattgodbolt's Advent of Compiler Optimisations, in which the compiler knows when to stop being clever because it knows modern CPUs with all their mad out-of-order pipelining jibber-jabber don't need any help - and he shows us a tool on #CompilerExplorer for looking into that. Read this one, but then watch the video too.
-
Slurrrrrrp....... Ahhh! @mattgodbolt
-
@uecker @Codeberg @mattgodbolt
Wat?As a Codeberg member myself, I checked your example here as well. The @compiler_explorer UI seems to handle the link just fine: if you click on the offered link, the raw file content is shown as you would expect. Then, the compiler is complaining about the file where the CE-internal machinery has supposedly put down the source text that it has downloaded from Codeberg.
So, there seem to be two different code paths in play. One, close to the UI, that works. And another one, hidden in the background, that doesn't.
-
More thanks to Matt Godbolt for today's episode of #AdventOfCompilerOptimisations, where the only horrors are in the tortured C code that gets turned into beautiful elegant assembler. The golden moment was the footnote alerting me to the existence of #CompilerExplorer's "optimisation pipeline explorer".
-
My #compilerexplorer #arm64 reference mug just arrived and is awesome! thanks @mattgodbolt !
-
I didn’t realize that #CompilerExplorer had become this…complicated 😰 — kudos to Matt Godbolt, et al for running it:
“How Compiler Explorer Works In 2025”, Matt Godbolt (https://xania.org/202506/how-compiler-explorer-works).
On HN: https://news.ycombinator.com/item?id=44183299
On Lobsters: https://lobste.rs/s/ocu642/how_compiler_explorer_works_2025
-
🥳🎉 In the dystopian wonderland of 2025, Compiler Explorer is the AI overlord, churning out 92 million compilations like it's flipping burgers 🍔. Who'd have thought a hacky weekend project would grow into Skynet's compiler? 🙃
https://xania.org/202506/how-compiler-explorer-works #dystopianfuture #AIoverlord #CompilerExplorer #techtrends #weekendproject #HackerNews #ngated -
How Compiler Explorer Works in 2025
https://xania.org/202506/how-compiler-explorer-works
#HackerNews #CompilerExplorer #2025 #FutureTech #Programming #Innovation #Coding
-
Fascinating (and a bit sad):
“Compiler Explorer And The Promise Of URLs That Last Forever”, Matt Godbolt (https://xania.org/202505/compiler-explorer-urls-forever).
On HN: https://news.ycombinator.com/item?id=44117722
On Lobsters: https://lobste.rs/s/rqc5yc/compiler_explorer_promise_urls_last
#Internet #Google #URLShortener #AWS #CompilerExplorer #SelfSufficiency
-
Compiler Explorer and the Promise of URLs That Last Forever
https://xania.org/202505/compiler-explorer-urls-forever
#HackerNews #CompilerExplorer #URLsForever #TechInnovation #SoftwareDevelopment #Programmers
-
In which meaningless #benchmarks comparing the #performance of different #ProgrammingLanguages really annoy Casey Muratori 😅:
#Speed #Optimization #Compilers #WTF #Programming #CompilerExplorer #GCC
-
Consider: semi-offline #CompilerExplorer that lazily downloads compilers using #Nix or #Guix .
-
-
On my recent India visit, I visited multiple academic campuses and addressed over 200 CS students (and 30 faculty). Regrettably, I did not once use Compiler Explorer (not even mention it) in any of my talks. 🥺
The topics of the talks just did not lend themselves to bringing up Compiler Explorer, but still I feel so ungrateful, like I let down someone. 😳
-
I was so hoping I could include JUnit with Java compiler/executor on Compiler Explorer, but alas. 😞
I don't know how hard it is to accomplish, but I filed a library request. Please vote and opine:
https://github.com/compiler-explorer/compiler-explorer/issues/6779
-
This is a Compiler Explorer appreciation post. Again. Because I can't say it enough.
-
@scottmichaud @smurthys I had a colleague who declined to use 'nullptr' in C++11 for "performance concerns". I wish we had had #CompilerExplorer back then.
-
I filed a feature request for #CompilerExplorer to "Add Executor" to "Conformance View" to make it easier and use less screen space.
The current approach requires three clicks and opens two windows going from a compiler in the list to seeing execution results. Adding an executor directly would change that to one click and opens just one window.
As an educator, I know students mostly need/want to see execution results, not assembly.
Comments welcome. 🙏🏽
https://github.com/compiler-explorer/compiler-explorer/issues/6495
-
Reply from a #CompilerExplorer team member on the name "Conformance View":
https://github.com/compiler-explorer/compiler-explorer/issues/5525#issuecomment-2118557565
IMO, users may use the feature to test "conformance", however they define that term, but CE itself does not do anything about conformance.
Instead, the feature lets users build a "compiler list" and adds a high-level indication of at least one compilation error (red) or no compilation error (green) with each compiler.
So "Compiler List" is a better name and it does not set higher expectation.
-
This episode of the Microarch Club #podcast (referenced in the newsletter above) is a nice #interview with Matt Godbolt, the creator of #CompilerExplorer:
https://overcast.fm/+BGzUcG5HNU
Excellent. 👌🏽
#ARM #BBCMicro #Acorn #Optimization #Games #ReverseEngineering #HFT
-
Have I mentioned in the last few weeks how much I love #CompilerExplorer? ❤️
BTW, I went to CE repo to learn about "Conformance View" and reading an existing issue there makes me ask:
Does Conformance View do things other than let me build a list of compilers and then show the fail/pass state of the code for each listed compiler?
DGMW that view is quite helpful, but does it do anything on its own about "conformance"? If yes, conformance to what? If not, is it misnamed?
https://github.com/compiler-explorer/compiler-explorer/issues/5525