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