Fastest possible XOR's in scratch. Press space to test (it will test 5 times to get good results. each test will have 100000 calls). I added a unrolled version because a tick of a repeat loop that has nothing takes time. So its obviously the best one. For me I get: 8 bit: 0.654s N bit: 0.976s 8 bit unrolled: 0.437s Comment yours