Quote Originally Posted by Salem
Write whatever you consider to be the simplest and most obvious code, and let the optimiser take over.
Micro-optimisations like this are a sure sign of focussing on the wrong thing, especially if your project is not yet complete.
Sure, I just thought there might be some clever way to write it as short, clean code without double checks or additional variables. Especially since I use it a few times throughout my code (which is mostly complete, I'm just trying to get some good style into it before adding optional stuff).

Thanks Salem and Ping!