Aug 25, 2017 · 1 min read
“Moral of the story. Never talk about optimization unless you have used profiler.”
Your example has nothing to do with micro optimization. Micro optimization applies to changes in the code that results in very little optimization (probably less then 1%), but can provide significant optimization when combined together.
In your case it was a real optimization and was only caught using profiler.
Everything in software development is a matter of balance. Good software engineers knows to follow best practices in order to avoid common performance issues and has good grasp of the system to know which part of it needs more attention for performance optimization. And of course always profile before optimizing.