Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
map-array-object-get-set
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Browser:
Chrome 135
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
object
2.2M/s
map
2.2M/s
array
2.1M/s
View exact numbers
Test name
Executions per second
✓
object
2,216,735 Ops/sec
map
2,186,194 Ops/sec
array
2,131,742 Ops/sec
Script Preparation code:
var map = new Map(); var arr = []; var obj = {}; var key; var randomU32 = function() { return Math.random() * (1 << 31) >>> 0; }
Tests:
map
key = randomU32(); map.set(key, true); key = map.get(key);
array
key = randomU32(); arr[key] = true; key = arr[key];
object
key = randomU32(); obj[key] = true; key = obj[key];