You don't micro-optimize while writing code.
You take performance concerns into consideration, and you absolutely avoid writing code that's obviously slow or stupid.
You add ways to instrument/measure/profile parts of your code and you measure performance early and often to catch performance problems early.
It's important to define what is "micro-optimization" because many people take the notion of "don't micro-optimize" and extend it to imply "don't worry about performance". This is a bad approach. Not worrying about performance leads to bad performance.
Micro-optimization means taking extra steps to shave off 5 or 10 or 50 cycles of instructions. This is not always a bad thing. If you are inside a tight loop then every cycle counts. But the problem with this approach is that if you program "depth-first" you will not get things done. You need to know when something is good enough and move on to the next thing. You can then come back later and "micro-optimize" the shit out of it later.