Strict mode

JavaScript performance comparison

Test case created by

Preparation code

<div id="a">
  Q
</div>
<div id="b">
  Q
</div>
      
<script>
Benchmark.prototype.setup = function() {
  function d(i) {
    var x = '999';
    y = eval(" y = 8 ;");
    var z = x + y + i;
    document.getElementById('a').innerHTML = z;
  }
  
  function c(i) {

    'use strict'
    var x = '999';
    var y = eval("y = 8 ;");
    var z = x + y + i;
    document.getElementById('b').innerHTML = z;
  }

};
</script>

Preparation code output

<div id="a"> Q </div> <div id="b"> Q </div>

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
nomarl
d(777);
pending…
strict mode
c(777);
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

Q
Q