Object creation (v3)

Revision 3 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
With one nested object
const user = { name: 'Jane' };
const address = { street: 'Main St.', number: 213 };

return {
      ...user,
      ...{
        street: address.street,
        number: address.number,
      },
    };
ready
Without nested object
const user = { name: 'Jane' };
const address = { street: 'Main St.', number: 213 };

return {
      ...user,
      street: address.street,
      number: address.number,
    };
ready

Revisions

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