• starelfsc2@sh.itjust.works
    link
    fedilink
    arrow-up
    4
    ·
    2 days ago

    It’s only really good if you are totally confident in what is and is not a mistake though, as it’ll do things like replace a struct with an int and be like “use a vec of indices and access the actual array with that since it’s smaller to copy and pass around!” when you have no need to copy and pass it around, and it basically created a layer of indirection for no reason.

    It’ll then make up some reason as to why you DO need to pass it around and copy it, so you have to be REALLY sure about what the code should be doing.

    • fruitcantfly@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      6 hours ago

      It probably depends on what model you are using, but what you describe is more akin to the kind of advice I’ve gotten when I’ve asked for suggestions for optimizations, rather than asked the LLM to identify (not solve) problems in the code. When I’ve asked the LLM to identify problems, the overwhelming majority of issues raised where true positives, though most of them weren’t very serious either