All laws
Premature Optimization
Misallocated Engineering Cost.
If
"Premature optimization is the root of all evil." Optimizing code before measurement proves it matters wastes engineering hours, adds complexity, and obstructs the eventual real optimization by entangling hot and cold paths.
Then
Write the obvious code first. Only optimize hot paths that a profiler proves are bottlenecks. Leave the other 97% of the code simple — that's where the next maintainer will live.
Unless
Profile First / Make It Work, Make It Right, Make It Fast (in that order)