XOR vs Array Swap

Benchmark publishedon

Setup

var a = 9;
var b = 30;

Test Runner

Initializing...

Testing in
Test CaseOps/sec
XOR
a = a^b
b = a^b
a = a^b
ready
Array Swap
[a, b] = [b, a]
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.

Revision 1
publishedon