I'm thinking moving cast to int32 (`r | 0`) above and giving `r` the int32 type might speedup the comparison operations (`r <= 0` and `r >= 0). I run tests at http://jsperf.com/precast to confirm this