Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
test Map vs Object
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Android 14; Mobile; rv:135.0) Gecko/135.0 Firefox/135.0
Browser:
Firefox Mobile 135
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
Map
2234.4 Ops/sec
Obj
33507.4 Ops/sec
Script Preparation code:
var map = new Map(); var obj = {}; map.set('a', 5); obj['a'] = 5; var i = 0, count = 10000, a;
Tests:
Map
for (i = 0; i < count; i++) { a = map.get('a'); map.set('b',1); }
Obj
for (i = 0; i < count; i++) { a = obj['a']; obj['b'] = 1 }