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.
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.