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