Declaring variables inside loops (v40)

Revision 40 of this benchmark created by Aleksej Komarov on


Test runner

Ready to run.

Testing in
TestOps/sec
Outside multi
var a;
var b;
var c;
var d;
for (var i = 0; i < 1000; i++) {
  a = 1;
  b = "2";
  c = {};
  d = [];
}
ready
Inside multi
for (var i = 0; i < 1000; i++) {
  var a = 1;
  var b = "2";
  var c = {};
  var d = [];
}
ready

Revisions

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