Pretty simple question. I know it would probably be a tiny optimization, but eventually you\'ll use enough if statements for it to matter.
EDIT: Thank you to those o
A rule of thumb that usually works is "If you know they do the same thing, then the compiler knows too".
If the compiler knows that the two forms yield the same result, then it will pick the fastest one.
Hence, assume that they are equally fast, until your profiler tells you otherwise.