binSwapVars (v18)

Revision 18 of this benchmark created on


Setup

var a = ~~ (Math.random() * 100000);
    var b = ~~ (Math.random() * 100000);

Test runner

Ready to run.

Testing in
TestOps/sec
binary
a ^= b;
b ^= a;
a ^= b;
ready
temp variable
var c = a;
a = b;
b = c;
delete c;
ready
js 1.7
[a, b] = [b, a]
ready

Revisions

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