should we initialize variables before loops (v34)

Revision 34 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
parsefloat with round
for (var i = 0; i < 1000; i++) {
  var x = i;
 var y = i / 7;
var z = i / 4;
var a = i / 11;
var b = i /13 ;
var c = i /19;
}
ready
without
var x = 0;
var y = 0;
var z = 0;
var a = 0;
var b = 0;
var c = 0;

for (var i = 0; i < 1000; i++) {
  x = i;
  y = i / 7;
z = i / 4;
a = i / 11;
b = i /13 ;
c = i /19;
}
ready

Revisions

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