Sign in
webkit
/
WebKit
/
4a12667b4cecb17e84375f8db50c9b2d39b06fe4
/
.
/
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
);