Object vs array update

Benchmark created on


Setup

const o = {x: 0, y: 0};
const a = [0, 0];

Test runner

Ready to run.

Testing in
TestOps/sec
Object
o.x++;
o.y++;
ready
Array
a[0]++;
a[1]++;
ready

Revisions

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