You could replace your IF with a UDF, but those are generaly slower than built-in functions.