2 ms·
> there is an almost fundamental disconnect between “easy to understand” and “fast and efficient” In my experience, poor performance is often because the code
by slavik81 4y ago
> there is an almost fundamental disconnect between “easy to understand” and “fast and efficient”
In my experience, poor performance is often because the code is needlessly complex and does unnecessary work. In that case, there's no trade-off. You can both improve performance and readability by simplifying.
There may be trade-offs required to optimize for the absolute maximum performance, but you can get most of the way there without sacrificing anything. The vast majority of programs are nowhere near the pareto frontier between performance and readability.