swap array vs variable (v35)

Revision 35 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
array
var a = 1,
    b = 2;

b = [a, a = b][0];
ready
variable
var a = 1,
    b = 2,
    c = a;

a = b;
b = c;
ready
bit
var a = 1,
    b = 2;

a = a ^ b;
b = a ^ b;
a = a ^ b;
ready
ecma6
var a = 1,
    b = 2;

[a,b]=[b,a]
ready

Revisions

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