6603011: RFE: Optimize long division

Transform long division by constant into multiply

Reviewed-by: never, kvn
This commit is contained in:
Chuck Rasbold 2008-05-07 08:06:46 -07:00
parent bb7ccea4ff
commit 72313bcf20
7 changed files with 483 additions and 207 deletions

View file

@ -890,7 +890,7 @@ inline int log2_long(jlong x) {
i++; p *= 2;
}
// p = 2^(i+1) && x < p (i.e., 2^i <= x < 2^(i+1))
// (if p = 0 then overflow occured and i = 31)
// (if p = 0 then overflow occured and i = 63)
return i;
}