‹ BackHN Continuity

Thread

Writing Rust code that's fast by asking agents to make the code faster

114 points · 63 comments · mooreds

  1. metalspot · · focus · HN ↗
    I have done a fair amount of low level performance optimization with Opus 5 and its reasoning is still very poor. Like why is CRC so slow and going through loops until I ask it if is using hardware instructions and it tells me it is using its own hand coded implementation poor. Reasoning about l1/l2/l3 cache hit ratios and their implications basically throwing darts at the wall, in the wrong room. If you give it a benchmark feedback loop then it might get there eventually but still massive alpha for low level systems engineers who instinctively know how this stuff works and can now automate 99% of the grind.
    1. physicsguy · · focus · HN ↗
      I ran into the exact same wall when doing some SIMD + OpenMP optimisations.

      Me: "Parallelise this loop without changing the results."

      AI: "I can't do that, because of floating point accumulation."

      Me: "So spin out a temporary fixed-length array, accumulate into that thread-locally, and then do an ordered summation of that at the end."

      AI: "Oh, you're right!"

      It's a fantastic tool for automating the implementation grind, but you still have to hand-feed it the strategy. I guess it will get there at some point.

      1. la_mezcla · · focus · HN ↗
        >> I guess it will get there at some point.

        Each tool in any domain "will get there at some point"

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.