Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Custom Benchmark 1234
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Browser:
Chrome 119
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
with map...
9807.2 Ops/sec
with object...
2880.8 Ops/sec
Script Preparation code:
var data = []; for (let i = 0; i < 1000; i++) { data.push([`field_${i}`, 'somve_value']) }
Tests:
with map...
const map = new Map(); for (let i = 0; i < data.length; i++) { map.set(data[i], true); }
with object...
const map = {}; for (let i = 0; i < data.length; i++) { map[data[i]] = true; }