mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 15:15:23 +00:00
39 lines
3.6 KiB
JavaScript
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(); |