Shorthand Object vs Explicit

Benchmark created on


Setup

const x = 1;
const y = 2;
const z = 3;

Test runner

Ready to run.

Testing in
TestOps/sec
Regular Object
const obj = {x: x, y: y, z: z};
obj;
ready
Shorthand Object Literal
const obj = {x, y, z};
obj;
ready

Revisions

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