Modern machines are so complex that it can be near impossible to say how long it takes to execute a sequence of instructions. It's easier on older processors, where instructions where strictly in order, and serial. Nowadays, they execute out of order and in parallel, so it's much harder to tell how long it will take. The key is to profile A LOT, and of course remove instructions that are not needed, and avoid re-calculating results that have already been calculated etc.
--
Mats