> I really don’t know how many developers use Compiler Explorer: we purposefully don’t have the kind of tracking that could tell us. But, it’s at least in the thousands I think
Why do you say that? I've bookmarked the site but I've never used it. If my code compiles, I'm good. Not many people dig into the assembly to find that extra 1% performance boost. I'm not saying this tool is not useful because it is but how often do you use it?
I seldom use it myself, but I frequently see people sharing compiler explorer snippets to compare generated assembly on discord conversations about LLVM in just about any native language discord (but mainly the Rust official one), which may sound like a rare occasion, but it happens more often than you'd think. My impression is that it is definitely in the thousands, but it being a service that I've only seen used for quick comparisons rather than in-depth analysis, I can't tell whether it is much more than that
The official Discord for Rust alone easily hammers it with hundreds of snippets a week. You just say "?godbolt" + a code block and one of the bots will respond with the assembly. It's incredible for answering quick questions like "huh I wonder if this gets optimized out."
While it might have been started to inspect the assembly, these days I mostly see it getting used to share compilable code and test it against multiple compilers.
Sometimes is just a quick way to test minimalist code snipets
* Right now, Compiler Explorer costs around $3000 a month (including AWS, monitoring, Sentry for errors, Grafana, and other expenses).
* nsjail for security/isolation
* 3.9 terabytes of compilers, libraries, and tools
* Up to 30+ EC2 instances (EC2 instances are virtual machines)
* 4,724 compiler versions
* 1,982,662 short links saved (and as of recently, ~14k ex-goo.gl links)
* 1.8 million compilations per week
If my napkin math is correct, it's around 3 compilations/sec.
and their cost is 0.0004 cents per compilation. Fascinating. If anyone asked me about ballpark estimate of compiler explorer cost, I'd be wrong at least at magnitude. Like - they must be heavy cpu/io/network bound, and this is like the worst scenario for cloud use.
I’d love to see a breakdown of their ec2 costs vs everything else. I’d expect that if they really wanted to a single bare metal machine would probably save them a decent chunk of money.
Same. I'm probably too old man shakes fist at cloud but whenever I see "$3000 per month in AWS costs" I think "or pay $6000-9000 one time to buy instead and be good for 3+ years".
I didn't know Nvidia supplied hardware to go along with their corporate sponsorship.
Total no-brainer though, since it will make programmers better at targetting their hardware. Hopefully other GPU makers notice and step in too. (I see intel already listed as a sponsor)
The tool is called Compiler Explorer, but is hosted at godbolt.org. There's also compliler-explorer.com, which is the same thing. Why not retire the first domain? Just redirect to the namesake domain to prevent link rot.
Funny enough, he has talked about this exact problem on his podcast “Two’s complement”; Specifically the episode “The future of compiler explorer”. Commenters below are correct that it’s just about how heavily associated his name is with the tool. I just figured I’d also drop this source here because he has a lot of interesting things to say about his involvement with the project
When I want to visit Compiler Explorer, I start typing godbolt, then his Enter when the browser brings up the correct item from my History. "compiler-explorer.com" is also much longer (if you want to type out the whole things).
> Ten years from now, that Stack Overflow answer showing a GCC 4.8 bug will still compile on CE exactly as it did when posted. It’s our small contribution to fighting link rot
The result can’t be cached? Why maintain an older version just for this?
Some of the compilers they use (msvc) are not open source and are not allowed to run in wasm.
And porting entire compiler toolchains to wasm would be a gargantuan task.
That would imply compiling each compiler to wasm, which might not be supported. Plus challenges like making a virtual file system to get the header files and other files needed for the compilation.
Edit: also, you couldn't execute the resulting binary
Putting AI disclaimers at the end of your post seems like the wrong way to do it. If you feel the need to put a disclaimer, put it at the top. Otherwise, what's the point?
> 8. Your browser renders the assembly, and you go “ooh, how clever is this compiler!”
Incorrect. I go “ooh, the appropriately named Mr. Godbolt is a fucking beast!”
So sorry to disappoint you, but I'm really not :D
Overruled
> I really don’t know how many developers use Compiler Explorer: we purposefully don’t have the kind of tracking that could tell us. But, it’s at least in the thousands I think
I think this a large underestimate :D
Why do you say that? I've bookmarked the site but I've never used it. If my code compiles, I'm good. Not many people dig into the assembly to find that extra 1% performance boost. I'm not saying this tool is not useful because it is but how often do you use it?
I seldom use it myself, but I frequently see people sharing compiler explorer snippets to compare generated assembly on discord conversations about LLVM in just about any native language discord (but mainly the Rust official one), which may sound like a rare occasion, but it happens more often than you'd think. My impression is that it is definitely in the thousands, but it being a service that I've only seen used for quick comparisons rather than in-depth analysis, I can't tell whether it is much more than that
The official Discord for Rust alone easily hammers it with hundreds of snippets a week. You just say "?godbolt" + a code block and one of the bots will respond with the assembly. It's incredible for answering quick questions like "huh I wonder if this gets optimized out."
While it might have been started to inspect the assembly, these days I mostly see it getting used to share compilable code and test it against multiple compilers.
Sometimes is just a quick way to test minimalist code snipets
tl;dr:
If my napkin math is correct, it's around 3 compilations/sec. and their cost is 0.0004 cents per compilation. Fascinating. If anyone asked me about ballpark estimate of compiler explorer cost, I'd be wrong at least at magnitude. Like - they must be heavy cpu/io/network bound, and this is like the worst scenario for cloud use.This and lichess (https://news.ycombinator.com/item?id=41922928#41928953) shows that you really can handle very serious loads for quite cheap.
> $3,00015
That’s a very weird place to put a comma. I have no idea what number this is representing (since I doubt it’s $3 a month)
the 15 is a copy-paste error (footnote)
Thank you, the comment has value now.
I’d love to see a breakdown of their ec2 costs vs everything else. I’d expect that if they really wanted to a single bare metal machine would probably save them a decent chunk of money.
But $3k/mo is surprisingly lean!
I'll do a follow-up post sometime on where the money goes.
Same. I'm probably too old man shakes fist at cloud but whenever I see "$3000 per month in AWS costs" I think "or pay $6000-9000 one time to buy instead and be good for 3+ years".
I didn't know Nvidia supplied hardware to go along with their corporate sponsorship.
Total no-brainer though, since it will make programmers better at targetting their hardware. Hopefully other GPU makers notice and step in too. (I see intel already listed as a sponsor)
The tool is called Compiler Explorer, but is hosted at godbolt.org. There's also compliler-explorer.com, which is the same thing. Why not retire the first domain? Just redirect to the namesake domain to prevent link rot.
Most people I know, including myself, refer to it as godbolt and not compiler explorer.
I didn’t know it was hosted anywhere other than godbolt.org
Funny enough, he has talked about this exact problem on his podcast “Two’s complement”; Specifically the episode “The future of compiler explorer”. Commenters below are correct that it’s just about how heavily associated his name is with the tool. I just figured I’d also drop this source here because he has a lot of interesting things to say about his involvement with the project
For anyone else wanting to listen to the episode, this site worked well for me:
https://podtail.com/en/podcast/two-s-complement/the-future-o...
It does have ads, but they were not too intrusive. Scroll down if there’s an ad on first click and there’s a play button that plays the episode.
For me the ads it showed were only text and images, not audio interrupting ads.
You can also listen to it on YouTube:
https://www.youtube.com/watch?v=2QXo5c7cUKQ
But since it’s audio only, I preferred listening to it via the aforementioned podcast website.
Because most people colloquially know it as "Godbolt".
The godbolt name is so iconic that at $WORK our locally hosted instance of compiler explorer is under the go/godbolt shortcut.
The go/godbolt shortcut form tells me that WORK=google
Is it right?
I had the go/ shortcut at at least two different jobs. Neither was G. But it is possible that xooglers set it up.
what kind of shortcut is this? a file path in your code bases?
When I want to visit Compiler Explorer, I start typing godbolt, then his Enter when the browser brings up the correct item from my History. "compiler-explorer.com" is also much longer (if you want to type out the whole things).
> Ten years from now, that Stack Overflow answer showing a GCC 4.8 bug will still compile on CE exactly as it did when posted. It’s our small contribution to fighting link rot
The result can’t be cached? Why maintain an older version just for this?
Caching millions of results doesn't seem like the best use of resources.
Knowing how a system behaves helps when you're trying to fix an issue. If you don't use the same version, it gets a lot harder.
you need only to cache asm output. It will take a few kb and no waste of cpu cycles.
For the author: are there any plans to make the compilers builds available ? Prebuilt gccs are a rare and valuable spice !
They are already free and available. Check out our "infra" repo and the ce_install tool and/or just hack the S3 URLs
I wonder how many compiler crashes they experience. That's a lot of test cases.
How about compiling client-side with wasm, fully or partially? Feasible? Was it considered?
Some of the compilers they use (msvc) are not open source and are not allowed to run in wasm. And porting entire compiler toolchains to wasm would be a gargantuan task.
WASM has x86 emulators.
It would be a lot of data to download and would likely be uncomfortably slow for many cases.
Also, as is mentioned in the article in a few places, the website is optimised for low effort rather than low cost.
That would imply compiling each compiler to wasm, which might not be supported. Plus challenges like making a virtual file system to get the header files and other files needed for the compilation.
Edit: also, you couldn't execute the resulting binary
Maybe it’s a client side error but I see three links of this post on the homepage.
Is it just me or something is wrong with HN https://ibb.co/0RwqjZvP
An interesting glitch. A few more refreshes and got the site unavailable message. It’s fixed now.
Putting AI disclaimers at the end of your post seems like the wrong way to do it. If you feel the need to put a disclaimer, put it at the top. Otherwise, what's the point?
AI disclaimer is both in the top and bottom. First box contains:
> Written with LLM assistance. Details at end.
Yep I totally didn't notice it because it's off to the side and looks like some kind of promo box.
i would argue that it might actually be a kind of promo box :-)
They're not even really disclaimers. There's no legal liability. It's just disclosure.
Will anything be ever written in future without a little help from llm?
[dead]