Why would it be slow? cant be slower than a whole lot of "If"!
It's not exactly all the extra push and pops onto the stack that eats up the CPU cycles...its the jump to the function code, and then the jump back to where the function was called that can really slow things down...as you start getting into cache hit/miss issues :P
course IF/THENs can invoke such speed problems as well...but you end up compounding the problem by exposeing the CPU to more and more jumps through function calls...one of the reasons we have precompilers with macro support :)
it's a really old trick that is only usefull for integers and won't work with floats.
Signed integers at that.
True...but if they arn't signed integers, then there is no need to even check them :)
Anyway, I'd stick with SGN() as it's more then fast enough for most all needs