how much performance is gained from "use strict"

Benchmark created by jurassicPieter on


Description

newer browsers have the "use script" line. It would improve Js performance by disabling hard to optimize parts. Let's see if it works.

Test runner

Ready to run.

Testing in
TestOps/sec
without use strict
var i, r = [];
for (i = 0; i < 10000; i++) {
  r[i] = i * i;
}
ready
with use strict
"use strict";
var i, r = [];
for (i = 0; i < 10000; i++) {
  r[i] = i * i;
}
ready

Revisions

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

  • Revision 1: published by jurassicPieter on
  • Revision 3: published on