swap array vs variable (v14)

Revision 14 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 = (_ = b, b = a, _);
ready
Arithmetic
var a = 1,
  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.