burakemirburakemir
Oct 9, 2026, 8:38 PMRefactoring can bring down the token cost.
This post here offers a comparison by Giles Edwards-Alexander (on Martin Fowler's site) of doing the same set of features, feature after feature - without and with refactoring in between https://martinfowler.com/articles/exploring-gen-ai/refactoring-economic-benefit.html
It is not a big scientific study but it is entirely plausible. Models are not intelligent, they get evaluated on tasks. You need to ask the right questions, and what is right has not changed all that much for software engineering.