Live data from Hacker News

Claude’s C Compiler vs. GCC

harshanu.space

51–60 of 377 posts

Re: Claude’s C Compiler vs. GCC

#51

I think this is a great example of both points of view in the ongoing debate. Pro-LLM coding agents: look! a working compiler built in a few hours by an agent! this is amazing! Anti-LLM coding agents: it's not a working compiler, though. And it doesn't matter how few hours it took, because it doesn't work. It's useless. Pro: Sure, but we can get the agent to fix that. Anti: Can you, though? We've seen that the more c…

Exactly. This flawed argument by which everything will be fixed by future models drives me crazy every time.

Re: Claude’s C Compiler vs. GCC

#52
post #43

"Ironically, among the four stages, the compiler (translation to assembly) is the most approachable one for an AI to build. It is mostly about pattern matching and rule application: take C constructs and map them to assembly patterns. The assembler is harder than it looks. It needs to know the exact binary encoding of every instruction for the target architecture. x86-64 alone has thousands of instruction variants wi…

Exactly this. Linker is threading given blocks together with fixups for position-independent code - this can be called rule application. Assembler is pattern matching.

This explanation confused me too:

  Each individual iteration: around 4x slower (register spilling)
  Cache pressure: around 2-3x additional penalty (instructions do not fit in L1/L2 cache)
  Combined over a billion iterations: 158,000x total slowdown
If each iteration is X percent slower, then a billion iterations will also be X percent slower. I wonder what is actually going on.

Re: Claude’s C Compiler vs. GCC

#53
The 158,000x slowdown on SQLite is the number that matters here, not whether it can parse C correctly. Parsing is the solved problem — every CS undergrad writes a recursive descent parser. The interesting (and hard) parts of a compiler are register allocation, instruction selection, and optimization passes, and those are exactly where this falls apart.

That said, I think the framing of "CCC vs GCC" is wrong. GCC has had thousands of engineer-years poured into it. The actually impressive thing is that an LLM produced a compiler at all that handles enough of C to compile non-trivial programs. Even a terrible one. Five years ago that would've been unthinkable.

The goalpost everyone should be watching isn't "can it match GCC" — it's whether the next iteration closes that 158,000x gap to, say, 100x. If it does, that tells you something real about the trajectory.

Re: Claude’s C Compiler vs. GCC

#54
post #14

I think this is a great example of both points of view in the ongoing debate. Pro-LLM coding agents: look! a working compiler built in a few hours by an agent! this is amazing! Anti-LLM coding agents: it's not a working compiler, though. And it doesn't matter how few hours it took, because it doesn't work. It's useless. Pro: Sure, but we can get the agent to fix that. Anti: Can you, though? We've seen that the more c…

Pretty much. It's missing a tiny detail though. One side is demanding we keep giving hundreds of billions to them and at the same time promising the other side's unemployment.

And no-one ever stops and thinks about what it means to give up so much control.

Maybe one of those companies will come out on top. The others produce garbage in comparison. Capital loves a single throat to choke and doesn't gently pluralise. So of course you buy the best service. And it really can generate any code, get it working, bug free. People unlearn coding on this level. And some day, poof, Microsoft is coming around and having some tiny problem that it can generate a working Office clone. Or whatever, it's just an example.

This technology will never be used to set anyone free. Never.

The entity that owns the generator owns the effective means of production, even if everyone else can type prompts.

The same technology could, in a different political and economic universe, widen human autonomy. But that universe would need strong commons, enforced interoperability, and a cultural refusal to outsource understanding.

And why is this different from abstractions that came before? There are people out there understanding what compilers are doing. They understand the model from top to bottom. Tools like compilers extended human agency while preserving a path to mastery. AI code generation offers capability while dissolving the ladder behind you.

We are not merely abstracting labor. We are abstracting comprehension itself. And once comprehension becomes optional, it rapidly becomes rare. Once it becomes rare, it becomes political. And once it becomes political, it will not be distributed generously.

Re: Claude’s C Compiler vs. GCC

#55
post #14

Earlier quoted context omitted.

Pretty much. It's missing a tiny detail though. One side is demanding we keep giving hundreds of billions to them and at the same time promising the other side's unemployment.

I don't feel that I see this anywhere but if so, I guess I'm in a third camp. I am "pro" in the sense that I believe that LLM's are making traditional programming obsolete. In fact there isn't any doubt in my mind. However, I am "anti" in the sense that I am not excited or happy about it at all! And I certainly don't encourage anyone to throw money at accelerating that process.

> I believe that LLM's are making traditional programming obsolete. In fact there isn't any doubt in my mind.

Is this what AI psychosis looks like? How can anyone that is a half decent programmer actually believe that English + non-deterministic code generator will replace "traditional" programming?

Re: Claude’s C Compiler vs. GCC

#57
What does the smallest (simplest in terms of complexity / lines of code) C-compiler that can compile and run SQLite look like?

Perhaps that would be a more telling benchmark to evaluate the Claude compiler against.

Re: Claude’s C Compiler vs. GCC

#58
post #19

I think this is a great example of both points of view in the ongoing debate. Pro-LLM coding agents: look! a working compiler built in a few hours by an agent! this is amazing! Anti-LLM coding agents: it's not a working compiler, though. And it doesn't matter how few hours it took, because it doesn't work. It's useless. Pro: Sure, but we can get the agent to fix that. Anti: Can you, though? We've seen that the more c…

> It's not fair to compare them like this! As someone who leans pro in this debate, I don't think I would make that statement. I would say the results are exactly as we expect. Also, a highly verifiable task like this is well suited to LLMs, and I expect within the next ~2 years AI tools will produce a better compiler than gcc.

The same two years as in "full self driving available in 2 years"?

Right.

Re: Claude’s C Compiler vs. GCC

#60
post #19

Earlier quoted context omitted.

> It's not fair to compare them like this! As someone who leans pro in this debate, I don't think I would make that statement. I would say the results are exactly as we expect. Also, a highly verifiable task like this is well suited to LLMs, and I expect within the next ~2 years AI tools will produce a better compiler than gcc.

The same two years as in "full self driving available in 2 years"? Right.

These are different technologies with different rates of demonstrated growth. They have very little to do with each other.
Post reply on HN