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 (X11; Linux x86_64; rv:139.0) Gecko/20100101 Firefox/139.0
Browser:
Firefox 139
Operating system:
Linux
Device Platform:
Desktop
Date tested:
10 months ago
Test name
Executions per second
null Object
35127784.0 Ops/sec
undefined Object
27062332.0 Ops/sec
delete object
1983989.0 Ops/sec
null map
21746662.0 Ops/sec
undefined map
18462650.0 Ops/sec
delete map
19961482.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');