Hacker News new | ask | show | jobs
by preg_match 1 day ago
They do a piss-poor job as compared to the output of compiled languages. The assembly will be slower and more buggy, because assembly has no guardrails.

A type system and compiler is for correctness. Using them results in higher quality software. There’s just zero reason to have an AI write assembly. Unless it’s tiny pockets of ultra-optimized assembly in, say, a decoder.

Think of it this way. The mere fact a compiler exists allows the LLM to use 1/10 of the tokens to get the same result. Instead of constantly iterating through the logic in its context and trying to figure out what’s going on, it can rely on the compiler, which is deterministic, to help it.

LLMs are not much different from human programmers when it comes to seeing new code. If you were onboarding into a new codebase, with no context, would you prefer assembly, PHP, or dotnet? Dotnet first, PHP second, assembly last. Dotnet has more context in the code itself, so you can reason about it quicker, easier, and more accurately.

1 comments

The same argument was used by Assembly developers when optimising compilers appeared.

What it matters is do they deliver a good enough product from management point of view, just like offshoring sweat shops.

If they do, it doesn't really matter to management, the new fancy LLM based tool is what gets used, and who doesn't want to, the door is at the end of the corridor.

There’s just no reason to use assembly as a target versus, say, dotnet. No reason.

It burns more tokens, it’s less performant, and it’s more buggy. You also can’t use existing libraries and tools.

And for that you get… nothing. Literally no benefit. So why would we do it?

There are uses for assembly in modern software, in niche small pockets to utilize hardware intrinsics for speed up in critical algorithms. But for applications? No, I don’t think so. It’s going to continue being programming languages, and I think programming languages with compilers, strong tools, and comprehensive type systems will prevail.

Even from the perspective of 100% LLM generated code, there’s just no benefit. You’re better off creating a one-off compiler for some DSL and having the LLM generate that even. LLMs do well with formal, strict languages. They don’t do well with things like assembly or wishy-washy languages.

I think that’s the whole reason we use LLMs at all. Yes they can understand natural language, but we don’t make programs in natural language because its too all over the place. LLMs excel most when they generate code. Nobody does business logic in an LLM, they get the LLM to generate code for the business logic.