Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Map.has vs Object hasOwnProperty
Lookup of map vs object
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 26_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/141.0.7390.41 Mobile/15E148 Safari/604.1
Browser:
Chrome Mobile iOS 141
Operating system:
iOS 26.0.1
Device Platform:
Mobile
Date tested:
8 months ago
Test name
Executions per second
Map lookup
497526.3 Ops/sec
Obj lookup
668528.4 Ops/sec
Script Preparation code:
var map = new Map(); var obj = {}; var j = 0; while (j < 10000) { var key = "Key_" + j; map.set(key, 5); obj[key] = 5; j += 1; } var stringKey = 'asdfasdjfa;sjfjaklfjklsjklajjjj;jlsjfajdfsfjs;fjsfka'; var i = 0, count = 1000, a;
Tests:
Map lookup
for (i = 0; i < count; i++) { a = map.has('stringKey'); }
Obj lookup
for (i = 0; i < count; i++) { a = obj.hasOwnProperty('stringKey'); }