swap array vs variable (v2)

Revision 2 of this benchmark created on


Test runner

Ready to run.

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


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

a = b;
b = c
ready
bitwise
var a=1;
var b=2;

a = a ^ b
b = a ^ b
a = a ^ b
ready

Revisions

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