Sign in
webkit
/
WebKit
/
9f4898815212c3069305f0eb8e79728e1e77a82a
/
.
/
JSTests
/
microbenchmarks
/
check-mul-power-of-two.js
blob: 92658838860275514bbba0ff723e407bc936cb81 [
file
] [
log
] [
blame
]
function
doTest
(
max
)
{
let sum
=
0
for
(
let i
=
0
;
i
<
max
;
++
i
)
{
sum
=
sum
+
i
*
64
;
}
return
sum
}
noInline
(
doTest
);
for
(
let i
=
0
;
i
<
100000
;
++
i
)
doTest
(
10000
)
if
(
doTest
(
10000
)
!=
3199680000
)
throw
"Error: bad result: "
+
doTest
(
10000
);