swap array vs variable (v16)

Revision 16 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
var a = 1,
    b = 2;

q = [ a, b ];
b = q[ 0 ];
a = q[ 1 ];
ready

Revisions

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