Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Compare Nulling, undefining and deleting of Javascript Object vs Map
Im preparing the Object in every test as i only want to measure the actual changes
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/131.0.0.0 Safari/537.36
Browser:
Chrome 131
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
null Object
35984104.0 Ops/sec
undefined Object
34681016.0 Ops/sec
delete object
10126811.0 Ops/sec
null map
26443220.0 Ops/sec
undefined map
26570784.0 Ops/sec
delete map
18094938.0 Ops/sec
Tests:
null Object
const map1 = new Map() map1.set('a', 999); map1.set('b', 3000); const a = { } a.a= 999; a.b= 3000; a.a = null; a.b = null;
undefined Object
const map1 = new Map() map1.set('a', 999); map1.set('b', 3000); const a = { } a.a= 999; a.b= 3000; a.a = undefined; a.b = undefined;
delete object
const map1 = new Map() map1.set('a', 999); map1.set('b', 3000); const a = { } a.a= 999; a.b= 3000; delete a.a; delete a.b;
null map
const map1 = new Map() map1.set('a', 999); map1.set('b', 3000); const a = { } a.a= 999; a.b= 3000; map1.set('a', null); map1.set('b', null);
undefined map
const map1 = new Map() map1.set('a', 999); map1.set('b', 3000); const a = { } a.a= 999; a.b= 3000; map1.set('a', undefined); map1.set('b', undefined);
delete map
const map1 = new Map() map1.set('a', 999); map1.set('b', 3000); const a = { } a.a= 999; a.b= 3000; map1.delete('a'); map1.delete('b');