Optimize BigDecimal in java

101 views Asked by At

In a web application I concerned, there is a blizzard of BigDecimal operations. Is there any way to optimize this in both memory footprint and cpu util?

I want to write some specific implementations like BigDecimal2 or BigDecimal10 for making the fields like scale and precision static. Nevertheless, I am not sure how much this can improve, or how much does it impact on the codebase.

The following screenshot is taken from jfr:

enter image description here

0

There are 0 answers