Fun With Local Variables

Benchmark created by Christopher Hiller on


Test runner

Ready to run.

Testing in
TestOps/sec
not so local
var foo = 'bar';
(function() {
  (function() {
    (function() {
      (function() {
        foo += 'baz';
      })();
    })();
  })();
})();
ready
pretty local
(function() {
  (function() {
    (function() {
      (function() {
        var foo = 'bar';
        foo += 'baz';
      })();
    })();
  })();
})();
ready

Revisions

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

  • Revision 1: published by Christopher Hiller on