grable #1 But to be honest I wouldnt worry about the hit, less you are calling it millions of times. And in that case I would write two different ones. And in that case the function call overhead is way more than a single If ;)