Can your AI rewrite your code in assembly?

Posted by signa11 1 day ago

Counter17Comment7OpenOriginal

Comments

Comment by fancythat 1 day ago

I had a similar thinking that this should be one of the most important USP for LLMs in coding. Does anyone here has more insights or experience in using LLM to cut through years of abstractions and just rewrite code in asm or any other low-level language?

Comment by Sophira 1 day ago

Sadly, I can't read this page on my non-mainstream browser as the server returns a 403 Forbidden error.

I get the need to protect yourself from AI bots, but banning all but mainstream browsers from viewing your content isn't the way.

Comment by signa11 1 day ago

which one ? just curious.

Comment by joshka 23 hours ago

> An open question is whether the AIs could find optimizations that are not possible if we use a higher-level language like C or C++. It is an intriguing question that I will seek to answer later. For the time being, the AIs can beat my C++ compiler!

Go throw yourself at Stockfish or another chess engine for this. They tend to have good test harness that can give you an idea of whether the speedups are worth the effort.

Comment by Fred27 1 day ago

Doesn't the compiler rewrite your code in assembly?

Comment by signa11 21 hours ago

commenting without reading the article, your being naughty again :o)

Comment by Fred27 3 hours ago

I did read it. A compiler converts your code into assembly. They usually have varying levels of optimisation depending on what you're doing.

The article boils down to "could AI be a good compiler" and I'd say that consistency and repeatability are far more important than a one-off optimisation of a particular section of code. If you've got to the point where a section of code is worth writing some hand-crafted assembly then it's probably worth your time to really understand what's happening with it. Having it "vibe compiled" for you would be a bad idea.