repo.or.cz
/
qtwebkit.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Update ReadMe.md
[qtwebkit.git]
/
JSTests
/
microbenchmarks
/
imul-mixed.js
blob
7788b9aaa8381d3439bd7d8965c3df34682be667
1
function f(a,b) {
2
var result = 0;
3
for (var i = 0; i < 1000; i++)
4
result = (result + Math.imul(a,b)) | 0
5
return result;
6
}
7
var result = 0;
8
for (var i = 0; i < 1000; i++)
9
result = result + f(result | 1, i+0.5) ^ f(i+1.3, result | 1);
10
11
if (result != -1567919232)
12
throw "Bad result: " + result;