Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
{} vs Map with set and DELETE
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Browser:
Chrome 135
Operating system:
Android
Device Platform:
Desktop
Date tested:
one year ago
Creation: Map
8K/s
Creation: Object
2K/s
View exact numbers
Test name
Executions per second
✓
Creation: Map
8,372 Ops/sec
Creation: Object
1,693 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
const d1 = {}; for (let i = 0; i < 10000; i++) { d1[i] = i; } const d2 = new Map(); for (let i = 0; i < 10000; i++) { d2.set(i, i); }
Tests:
DELETE: Object
for (let i1 = 0; i1 < 10000; i1++) { delete d1[i1]; }
DELETE: Map
for (let i2 = 0; i2 < 10000; i2++) { d2.delete(i2); }