void vs undefined (v10)

Revision 10 of this benchmark created by bga_ on


Test runner

Ready to run.

Testing in
TestOps/sec
undefined
(function(a) {
 return (a === undefined);
})();
ready
void
(function(a) {
 return (a === void 0);
})();
ready
void2
function b(a) {
 return (a === void 0);
};

b();
ready
typeof
(function(a) {
 return typeof a === 'undefined';
})();
ready
var
(function(a) {
 var undefined2;
 return a === undefined2;
})();
ready
== null
(function(a) {
 return a == null;
})();
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.