←back to thread

-2000 Lines of code

(www.folklore.org)
499 points xeonmc | 1 comments | | HN request time: 0s | source
Show context
LAC-Tech ◴[] No.44382199[source]
This just depresses me. So many programmers back then spent time optimising algorithms. Now it's slop city.
replies(1): >>44382993 #
pkaye ◴[] No.44382993[source]
I've been playing with Claude 4 Sonnet in VS Code and found it quite good. As part of the development plan, on its own it had included an optimization phase where it profiled my go code, identified some hot spots, and proposed ways to optimize it. For the most critical area, it suggested using a prefix tree which it wrote on the spot, adapted to my code, wrote benchmarks to compare the old and new version (5x improvement). Then it wrote specific tests to make sure both versions behaved the same. Then it made sure all my other tests passed and wrote a report on everything.

There were three performance optimizations in total, one which I rejected because the gain was minimal for typical use case and there are still some memory allocation optimization which I have deferred with because I'm in the middle of a major refactor of the code. The LLM has already written down plans to restart this process later when I more time.

replies(1): >>44385389 #
1. efnx ◴[] No.44385389[source]
I’d be wary of doing any but the most obvious optimisations without profiling. This goes for humans or AI.