gecko-dev/js/benchmarks/eval_bench.js
norris%netscape.com 28b57410f7 Add benchmarks.
1999-06-04 18:44:17 +00:00

39 lines
3.6 KiB
JavaScript

print("eval_bench.js");
// assign to a var from within an eval
function eval_1()
{
var t = { };
var q = { };
var startTime = new Date();
for (var i = 0; i < 5; i++) {
eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;");
eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;");
eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;");
eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;");
eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;");
eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;");
eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;");
eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;");
eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;");
eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;");
eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;");
eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;");
eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;");
eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;");
eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;");
eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;");
eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;");
eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;");
eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;");
eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;"); eval("t = q;");
}
var elapsedTime = (new Date()).getTime() - startTime.getTime();
print("eval_1 : " + elapsedTime);
total += elapsedTime;
}
eval_1();