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:
one year ago
null Object
35.1M/s
undefined Object
27.1M/s
null map
21.7M/s
delete map
20.0M/s
undefined map
18.5M/s
delete object
2.0M/s
View exact numbers
Test name
Executions per second
✓
null Object
35,127,784 Ops/sec
undefined Object
27,062,332 Ops/sec
null map
21,746,662 Ops/sec
delete map
19,961,482 Ops/sec
undefined map
18,462,650 Ops/sec
delete object
1,983,989 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');