Sign in
webkit
/
WebKit
/
293423b2e3bc99a3b6b08c9e39c59d8eb89f00e1
/
.
/
JSTests
/
microbenchmarks
/
check-mul-no-constant.js
blob: 962c2a0531061b63bf1acbfad3e4ca53e4a50814 [
file
] [
log
] [
blame
]
function
doTest
(
max
)
{
let sum
=
0
for
(
let i
=
0
;
i
<
max
;
++
i
)
{
sum
=
sum
+
i
*
i
;
}
return
sum
}
noInline
(
doTest
);
for
(
let i
=
0
;
i
<
100000
;
++
i
)
doTest
(
10000
)
if
(
doTest
(
10000
)
!=
333283335000
)
throw
"Error: bad result: "
+
doTest
(
10000
);