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