Sign in
webkit
/
WebKit
/
9f4898815212c3069305f0eb8e79728e1e77a82a
/
.
/
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
;
}