Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Object literal vs Object.create(null)
compare performance of object creating non-empty objects using object literal vs Object.create
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0
Browser:
Firefox 115
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Object.create(null)
4339.9 Ops/sec
object literal
2511.0 Ops/sec
Tests:
Object.create(null)
const a = []; for (let i = 0; i < 10000; i++) { const o = Object.create(null) o.x = 'a string' o.y = 17 o.z = { m: 'an object', n: 97 } a.push( o ) }
object literal
const a = []; for (let i = 0; i < 10000; i++) { const o = { x: 'a string' } o.y = 17 o.z = { m: 'an object', n: 97 } a.push( o ) }