Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Creating object (Map vs Object literal)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0
Browser:
Firefox 113
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
2 years ago
Object literal
1077.6M/s
Map
1.6M/s
View exact numbers
Test name
Executions per second
✓
Object literal
1,077,561,344 Ops/sec
Map
1,619,220 Ops/sec
Tests:
Map
const obejct = new Map(); obejct.set('field1', 1); obejct.set('field2', 2); obejct.set('field3', 3); obejct.set('field4', 4);
Object literal
const object = { field1: 1, field2: 3, field3: 3, field4: 4, };