void 0 vs null (v4)

Revision 4 of this benchmark created on


Setup

var i=false;
    var g;

Test runner

Ready to run.

Testing in
TestOps/sec
void 0
if (g !== void 0) i=true;
ready
null
if (g != null) i=true;
ready
void 0 - nonstrict
if (g != void 0) i=true;
ready
0[0] - strict
if (g !== 0[0]) i=true;
ready
0[0] - nonstrict
if (g != 0[0]) i=true;
ready
undefined - strict
if (g !== undefined) i=true;
ready
undefined - nonstrict
if (g != undefined) i=true;
ready

Revisions

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