undefined vs void test

JavaScript performance comparison

Test case created by

Preparation code


      
      <script>
Benchmark.prototype.setup = function() {
  var d = true;
  var u = undefined;

};
</script>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
typeof u === 'undefined'
typeof u === 'undefined'
pending…
typeof d === 'undefined'
typeof d === 'undefined'
pending…
u === void 0
u === void 0
pending…
d === void 0
d === void 0
pending…

Compare results of other browsers

Revisions

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

0 Comments