function test() {
result(runTest()+" "+runTest());
}
function runTest(){
var loops = 50000;
var before = new Date();
var stuff = "";
for (var i = 0; i<loops; i++) {
stuff = "012"+"abc"+"def"+"345" + i + "012"+"abc"+"def"+"345"+"012"+"abc"+"def"+"345";
}
var after = new Date();
var time1 = (after-before);
stuff = "";
//
//
// had to delete out the variable assignment, loop overhead, and the general concatenation of the string and the counter
//
//
var loops2 = 50000;
var before2 = new Date();
var stuff2 = "";
for (var k = 0; k<loops2; k++) {
stuff2 = "a"+k+"g";
}
var after2 = new Date();
var time2 = (after2-before2);
stuff2 = "";
//
//
var difference = (time1-time2);
return difference;
}