object.create(null) vs {}

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Object.create(null)
const a = Object.create(null);
ready
{}
const a = {};
ready
access Object.create(null)
const a = Object.create(null);

a.foo = "bar";

const b = a.foo;
ready
access {}
const a = {};

a.foo = "bar";

const b = a.foo;
ready

Revisions

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