Use bitwise operators where possible, this results in a ~10 speedup according to preliminary testing
Use bitwise operators where possible, this results in a further ~15 speedup according to preliminary testing