6 ms·
> it's become easier than ever to make serious performance gains Is that true and if yes why? I was under the impression that it would become more difficult ov
by lavela 1mo ago
> it's become easier than ever to make serious performance gains
Is that true and if yes why? I was under the impression that it would become more difficult over time to make serious performance gains, which would also fit with reaching for benchmark hacking rather than relying on natural gains.
- dan-robertson 29d agoFor a program that has not received much optimisation effort, the thing limiting performance gains is developer time and skill. It is not uncommon to have some small bit of code that could matter a lot, eg maybe you are doing something like escaping a string in a special way or processing lots of json. A human might write a simple character-at-a-time loop for the first case and might use some DOM-based api for the second case. What would have once required quite skilful work to optimise can now be done by siccing an LLM on the problem, where it can achieve a reasonable result (eg SIMD+expand-bits in the first case, and a good streaming api in the second) so long as you have good tests (fuzzing/property tests, production examples) and an ok benchmark (ideally a representative sample of production data plus some edge cases) you should get small results. The failure mode for optimisation described in this post is for harder optimisation problems with competing benchmarks. LLMs are also pretty willing to do drudgery and are quite good at using perf, looking at traces, etc. they are often pretty stupid but if you throw a lot of stupid effort at a problem you can still achieve better results than the status quo of throwing ~zero smart effort at it.