Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Compare comparison with null or undefined (nested3)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Browser:
Chrome 131
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
value === null
78873656.0 Ops/sec
value === undefined
77033040.0 Ops/sec
value !== null
76912592.0 Ops/sec
value !== undefined
73936736.0 Ops/sec
Script Preparation code:
var value = { a: 123 }; var valueNull = null; var valueUndefined; var zz; function x() { function y() { function z() { function f() { function g() { function h() { function m() { function n() { function s() { function t() { function k() { function q() { function w() { function o() { function r() { zz = { callNull: function() { value === null; valueNull === null; }, callUndefined: function() { value === undefined; valueUndefined === undefined; }, callNotNull: function() { value !== null; valueNull !== null; }, callNotUndefined: function() { value !== undefined; valueUndefined !== undefined; } }; } r(); } o(); } w(); } q(); } k(); } t(); } s(); } n(); } m(); } h(); } g(); } f(); } z(); } y(); } x(); function callNull() { zz.callNull(); } function callUndefined() { zz.callUndefined(); } function callNotNull() { zz.callNotNull(); } function callNotUndefined() { zz.callNotUndefined(); }
Tests:
value === null
callNull();
value === undefined
callUndefined();
value !== null
callNotNull();
value !== undefined
callNotUndefined();