Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Compare comparison with null or undefined (nested2)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0
Browser:
Firefox 123
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
value === null
172611760.0 Ops/sec
value === undefined
263126560.0 Ops/sec
value !== null
293581792.0 Ops/sec
value !== undefined
166552464.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 === null; }, callNotNull: function() { value !== null; valueNull !== null; }, callNotUndefined: function() { value !== undefined; valueUndefined !== null; } }; } 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();