static vs dynamic object

Benchmark created on


Setup

const objA = { x: 3, y: 2, z: 0, w: {} };
const objB = { x: 3, y: 2, z: 0, w: {} };

Test runner

Ready to run.

Testing in
TestOps/sec
static
objA.z = objA.x + objA.y;
objA.w = null;
objA.w = {};
ready
dynamic
objB.z = objB.x + objB.y;
delete objB.w;
objB.w = {};
ready

Revisions

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