Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Object vs Map with string key
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Browser:
Chrome 132
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
obj
45K/s
map
26K/s
View exact numbers
Test name
Executions per second
✓
obj
44,583 Ops/sec
map
25,579 Ops/sec
Tests:
obj
const key = 'discover_more'; const obj = { [key]: 123456789 }; let a; for(let i = 0; i < 100000; i += 1){ a = obj[key]; }
map
const key = 'discover_more'; const map = new Map(); map.set(key, 123456789); let a; for(let i = 0; i < 100000; i += 1){ a= map.get(key); }