‹ BackHN Continuity

Thread

Once Claude can measure something, it can make it faster

231 points · 153 comments · matthieu_bl

  1. smy20011 · · focus · HN ↗
    The way Claude did it is fight entropy with entropy.

    "Add a static composer into the HTML" <- This seems like something can be done with SSR?

    "For faster navigations, we kept the composer mounted between conversations" <- Your SPA should cache this between pages, why fetching it every time? Or you need better routing for your react components.

    "cheap first-character check before the regex" <- Should we cache compiled Regex instead?

    I think even 1.3 sec to load the front page is unacceptable. Something need to be reworked from basics (SSR, chunk-based rendering) to solve the problem. Focusing on invidual benchmarks may miss the opportunity.

    1. rustystump · · focus · HN ↗
      The amount of complexity added for the gains is depressing. I am confident a human and about 5 minutes with chrome debugger would yield better results with a fraction of the complexity at a fraction if the cost and in a fraction of the claude baby sitting time.

      Reading this shows the authors have a profound lack of fundamental understanding on how to effectively optimize in the web domain.

      This isnt claude being bad but how wild it is watch people from the cutting edge of ai brag about pretty mediocre gains.

      1. adamddev1 · · focus · HN ↗
        When people talk about AI being able to handle everything I keep wondering, have these people built anything complex, novel or serious? Just because people can see a website or a simple app improved, does that mean that all code can be handled by LLMs? It's like people are totally forgetting a whole category of careful, well-thought out programming for the critical parts.
        1. whatisthiseven · · focus · HN ↗
          Yes, what you are seeing are amateur developers that barely understand the tools they are using either giving LLMs poor instructions, or totally taking whatever it says at face value, then not bothering to put in further effort.

          If they just kept prompting it, or maybe used a different thinking level, it could have identified and solved this problem. Sometimes an engineer would look at a system and say "the current approach isn't delivering the desired engineering requirements. Maybe we need to rethink".

          Either engineer or LLM could take that sentence and run with it. OP of the article clearly can't do either.

          1. theolivenbaum · · focus · HN ↗
            You're missing the point where: in complex systems, sometimes optimizing code is both a high effort undertaking, and can totally not pay off. Having done hundreds of such exercises on our software over the years, it's liberating to have an idea of how to make something faster, being able to validate it without the fear of having to throw it all in the trash if it fails after days of work. What is still important is being able to provide proper guidance - we even built new tools to allow an AI agent to analyze memory usage in more depth, and instructions on how to benchmark in cloud environments where shared CPU usage and VM reallocation happen all the time and confuses the AI all the time with measurements
            1. kanzure · · focus · HN ↗
              Also, not every task is worthy of applying (human) galaxy brain consideration. Sometimes a task is satisfied by cheap + dumb work.
          2. crooked-v · · focus · HN ↗
            > the current approach isn't delivering the desired engineering requirements. Maybe we need to rethink

            I'm reminded of the times I've tried to let Claude fix some well-documented bug in the background, and it ends up burning 4 million tokens and 20 self-review cycles re-writing the same set of code a dozen times with ever more complex unit test mocks / overcomplicated regexes / giant comments restating the same thing the code does, when the actual fix turned out to be "change three to ten lines to do something in a slightly different way that avoids the problem entirely".

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.