review request for 6622432 (original) (raw)
Christian Thalinger Christian.Thalinger at Sun.COM
Tue Feb 17 11:15:15 UTC 2009
- Previous message: review request for 6622432
- Next message: review request for 6622432
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, 2009-02-16 at 14:33 -0800, Xiaobin Lu wrote:
Webrev: http://webrev.invokedynamic.info/xiaobin.lu/6622432/
6622432: RFE: Performance improvements to java.math.BigDecimal
As you know, the division operation is expensive and the algorithm to compare with the ten's power array can be made more efficiently by correlating the bit length of the number with the index to the array so that the time to compute the precision is O(1) rather than being O(n) (where n is the length of the array). And that is exactly what we are doing in the webrev. First, we get the bit length of the number and then multiply it with log2 (10 base), use the result to index to a dynamically expanded ten's power array so that division operation can be avoided completely.
Actually I'm not reviewing the webrev but I have some questions.
Is bitCount() called often and performance critical? There is a RFE (6378821) to intrinsify it and I am thinking about to implement it.
Why is BigInteger using it's own implementation of bit-count (bitCnt()) instead of using Integer.bitCount()?
-- Christian
- Previous message: review request for 6622432
- Next message: review request for 6622432
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]