js-null-undefined-equality (v5)

Revision 5 of this benchmark created on


Preparation HTML

<script>
  var x;
  var y;
  var z = null;
  var result = false;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
nonstrict-null
result = (x == null);
ready
strict-undefined
result = (x === y);
ready
nonstrict-undefined
result = (x == y);
ready
typeof
result = (typeof x === 'undefined');
ready
compare null
result = (z === null);
ready
compare undefined
result = (z === undefined);
ready
sloppy false
result = (!z);
ready

Revisions

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