Object Creation

Benchmark published by System on

Description

Compare ways to create objects.

Test Runner

Initializing...

Testing in
Test CaseOps/sec
Object literal
const obj = { a: 1, b: 2 };
ready
new Object()
const obj = new Object();
obj.a = 1;
obj.b = 2;
ready
Object.create(null)
const obj = Object.create(null);
obj.a = 1;
obj.b = 2;
ready

Revisions

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

Revision 1
publishedby Systemon