• Brujones@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    2 days ago

    I got curious about x86 assembly, so I followed some tutorials to get the hang of it. Once I had some confidence, I wrote a prime number generator. I had a loop that I was sure could be more efficient, but couldn’t figure it out.

    I pasted the code to ChatGPT. It came back with an optimization that wouldn’t work because it wasn’t preserving critical register values. I pointed that out, and it responded, again and again, with the same code with the same problem. I was never able to get it out of this broken record mode.