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