‹ BackHN Continuity

Thread

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

114 points · 63 comments · mooreds

  1. hombre_fatal · · focus · HN ↗
    If it can be measured, then LLMs can optimize it.

    Once I had repo commands that could dump `sample` results and a cpu profiler/trace and then a benchmark tool that let me A/A + ABBA/BAAB-test the current modified git workspace against HEAD or any commit, the LLMs could just do their thing.

    And that's how my homemade terminal uses much less memory than ghostty/kitty/iterm yet has more throughput.

    AI is going to increasingly unmask people and companies who don't care about correct and performant software now that it's become so trivial to guarantee both. It used to at least be expensive and time-consuming and expertise-demanding to do those things.

    1. dasil003 · · focus · HN ↗
      Agree it's amazing how much low-hanging performance fruit AI can trivially find. On the other hand though, once you get through the obvious no-brainer stuff, there's a lot of non-trivial tradeoffs in performance and I think that still demands a good amount of expertise to guide the AI in the right direction. Obviously AI will continue working it's way up the value chain, but I think there's a glass ceiling for AI where the right macro tradeoffs and perspectives on how software should work will bump into the hard and often articulated reality that different stakeholders want different things and often have either magical thinking or even self-deception about how those desires can co-exist with what everyone else wants.

      This isn't a new problem by any means, but now that code is cheap, it means instead of getting frustrated with engineering and their pesky unimportant details, people will get frustrated with the AI and it's pesky unimportant details.

      1. hombre_fatal · · focus · HN ↗
        Yeah, the biggest example is performance optimizations that sacrifice your data model to the point that you'd never accept them.

        I think it's one reason why ADRs are an important of a software project, especially with LLMs. You need a place were you can document invariants, why you have them + the rejected ideas and acceptable risks.

        It helps smart agents like Fable help you decide on trade-offs and it's kind of incredible to witness that happening.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.