mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
407 B
32 lines
407 B
11 years ago
|
/*
|
||
|
* Basic function call performance.
|
||
|
*/
|
||
|
|
||
9 years ago
|
if (typeof print !== 'function') { print = console.log; }
|
||
|
|
||
11 years ago
|
function test() {
|
||
|
var i;
|
||
|
|
||
|
function f() { return; }
|
||
|
|
||
9 years ago
|
for (i = 0; i < 1e7; i++) {
|
||
|
f();
|
||
|
f();
|
||
|
f();
|
||
|
f();
|
||
|
f();
|
||
|
f();
|
||
|
f();
|
||
|
f();
|
||
|
f();
|
||
11 years ago
|
f();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
try {
|
||
|
test();
|
||
|
} catch (e) {
|
||
|
print(e.stack || e);
|
||
9 years ago
|
throw e;
|
||
11 years ago
|
}
|