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
null Object
36.0M/s
undefined Object
34.7M/s
undefined map
26.6M/s
null map
26.4M/s
delete map
18.1M/s
delete object
10.1M/s
View exact numbers
Test name
Executions per second
✓
null Object
35,984,104 Ops/sec
undefined Object
34,681,016 Ops/sec
undefined map
26,570,784 Ops/sec
null map
26,443,220 Ops/sec
delete map
18,094,938 Ops/sec
delete object
10,126,811 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');