Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Map vs object for deletions
Checks the performance of deletions and additions to Maps vs objects
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3.1 Safari/605.1.15
Browser:
Safari 18
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Add to Map
103044192.0 Ops/sec
Add to object
336685792.0 Ops/sec
Delete from Map
104450584.0 Ops/sec
Delete from object
361371680.0 Ops/sec
Script Preparation code:
var testMap = new Map(); var testObj = {};
Tests:
Add to Map
testMap.set('testKey', 1);
Add to object
testObj.testKey = 1;
Delete from Map
testMap.delete('testKey');
Delete from object
delete testObj.testKey;