Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Map has vs Object hasOwnProperty
Comparing performance of: Map lookup vs Obj lookup
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Android 11; Mobile; rv:129.0) Gecko/129.0 Firefox/129.0
Browser:
Firefox Mobile 129
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
Map lookup
169.2 Ops/sec
Obj lookup
145.0 Ops/sec
Script Preparation code:
var map = new Map(); var obj = {}; map.set('a', 5); obj['a'] = 5; var i = 0, count = 100000;
Tests:
Map lookup
for (i = 0; i < count; i++) { map.has('a'); }
Obj lookup
for (i = 0; i < count; i++) { obj.hasOwnProperty('a'); }