A Harmonious Combo: Experiences Profiling Apache* Harmony with Eclipse* TPTP
© 2008 Intel Corporation; made available under the EPL v1.0
25
      Eclipse* TPTP Project
Apache* Harmony Project
Performance study: SPECjbb* 2005 – java.math.* (~10%)
Each BigDecimal.add() invokes BigInteger.add()
A BigDecimal is a BigInteger plus a scaling factor
Do we really need to create separate BigInteger object for each BigDecimal value?
•Let’s incorporate small values (<19 digits) directly into BigDecimal.
Result: More then a 30% boost!!!
Short Quiz:
java.math.* took ~10%?
How did we get more then 30%?
Only 1 object (BigDecimal) is created
•Instead of 3 objects (BigDecimal, BigInteger, int[])
•Less GC stress!
http://issues.apache.org/jira/browse/HARMONY-551