Comment by IshKebab
1 month ago
I agree with you. It's gotten extremely good very recently and I think a lot of people haven't realised.
And they also won't believe you since they formed their opinion 6 months ago when code quality was 80% slop. Their loss though I guess? At least they'll be more surprised than us when they actually do lose their jobs? Maybe blissful ignorance is better!
Or maybe you stopped being able to tell?
In my very recent experience, it's good for routine things, but it consistently chooses the wrong sync primitives and dynamic abstractions for performance / extensibility. It puts everything in a Mutex/RWLock, which is terrible for write-heavy / contested values, and it prefers enums over traits, which is not extensible and can get inefficient.
But we're rapidly heading into a world where people no longer understand the difference, and therefore everything looks fine to them.
LLMs can write very performant code, but they have to understand that it's explicitly important to you.
If possible capturing golden inputs/outputs for a block of code, and just asking the agent to optimize while ensuring those goldens pass can be quite effective.
There's a lot of performance-sensitive code where I work (i.e. market data processing) and LLMs have been very effective at reducing our p50, p99, etc...
They will sometimes choose the simple slow options, true. But there's a very trivial fix. I just regularly ask the AI to review the entire codebase for bugs, performance bottlenecks (it will happily profile your code), possible simplifications and YAGNIs. I get it to give me a ranked list and then I review that and ask it to do some of them.
Occasionally I do spot things and get a "you're right, I was wrong". But it's got to the point that my thought is no longer "of course I am... shitty slop machine" but "phew, I'm not totally obsolete quite yet!".