‹ 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. Capricorn2481 · · focus · HN ↗
      > If it can be measured, then LLMs can optimize it

      Then they can start attempting to optimize it. They can also spin round and round making the numbers worse because they don't actually know what to do.

      1. loeg · · focus · HN ↗
        > They can also spin round and round making the numbers worse

        "Claude, if this idea doesn't measure as an improvement (use X benchmark and a T-test), discard it and try the next idea."

        1. Capricorn2481 · · focus · HN ↗
          Yes, that is the spinning round and round part.
          1. loeg · · focus · HN ↗
            Crucially, it is easy to avoid making things worse, which was the entire thrust of my earlier comment and the part you've ignored in your response.
            1. Capricorn2481 · · focus · HN ↗
              I didn't ignore it, I just think spinning round and round is also bad.
              1. loeg · · focus · HN ↗
                Ok. I think the goalposts have shifted from your original remarks.
                1. Capricorn2481 · · focus · HN ↗
                  I don't think so? I think spending a bunch of money on agent tokens with no outcome is worth flagging, which was the substance of my comment.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.