truth

JavaScript performance comparison

Test case created by Malte Ubl

Preparation code

<script>
  var i = 0;
  var one = 1;
  var zero = 0;
  var bool = 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
if (bool) i++
if (bool) i++
pending…
if (!!bool) i++
if (!!bool) i++
pending…
if (!0) i++
if (!0) i++
pending…
if (true) i++
if (true) i++
pending…
if (false) i++
if (false) {} i++
pending…
if (1) i++
if (1) i++
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.

2 Comments

Malte Ubl (revision owner) commented :

See comment to you're revision. On a related note: Tests from Chrome 15 are do not seem to be recorded by browserscope right now.