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