js-null-undefined-equality (v10)

Revision 10 of this benchmark created on


Preparation HTML

<script>
var vals = [0,null,'',undefined];
var offset = 0;

  var sink;
var x;
function next() {
  x = vals[offset = 3 & (offset + 1)];
}
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
nonstrict-null
next()
sink = x == null;
ready
strict-undefined
next();
sink = x === undefined;
ready
nonstrict-undefined
next();
sink = x == undefined;
ready
strict-null
next();
sink = x === null;
ready
both strict
next();
sink = x === null || x === undefined;
ready

Revisions

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