bang-bang vs Boolean

JavaScript performance comparison

Test case created by Matt

Preparation code


      
      <script>
Benchmark.prototype.setup = function() {
  var boo1 = [];
  var boo2 = 0;
  var boo3 = true;

};
</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
bang bang
!!boo1;
!!boo2;
!!boo3;
pending…
Boolean
Boolean(boo1);
Boolean(boo2);
Boolean(boo3);
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