Sign in
webkit
/
WebKit
/
d5bc8626ff9394ad3cac4aff99be89e91a8d2265
/
.
/
JSTests
/
microbenchmarks
/
create-lots-of-functions.js
blob: 0b4b735a52e2506c8ec7a77b3fc0ef784fb4e629 [
file
] [
log
] [
blame
]
function
foo
()
{
var
result
=
0
;
for
(
var
i
=
0
;
i
<
100
;
++
i
)
result
+=
(
function
()
{
return
i
})();
return
result
;
}
for
(
var
i
=
0
;
i
<
10000
;
++
i
)
{
var
result
=
foo
();
if
(
result
!=
4950
)
throw
"Error: bad result: "
+
result
;
}