Update list of variables vs single object

Benchmark created on


Setup

let a = 0;
let b = 0;
let c = 0;
let d = 0;
let e = 0;
let f = 0;
let o = {a: 0, b: 0, c: 0, d: 0, e: 0, f: 0};

Test runner

Ready to run.

Testing in
TestOps/sec
List of variables
a++;
b++;
c++;
d++;
e++;
f++;
ready
Update object
o.a++;
o.b++;
o.c++;
o.d++;
o.e++;
o.f++;
ready
Replace object
o = {a: o.a+1, b: o.b+1, c: o.c+1, d: o.d+1, e: o.e+1, f: o.f+1};
ready

Revisions

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