Connecting Tech Pros Worldwide Help | Site Map

BigDecimal Builder and immutability...

Tommy
Guest
 
Posts: n/a
#1: Jun 27 '08
Our application uses BigDecimal, and BigDecimal is immutable. Immutability
is certainly a good thing, but it also means that there are a lot more
memory allocations (and collections). That's ok, we are all happy that
Strings are immutable, but Java also gives us StringBuilder and
StringBuffer. Is there anything similar for BigDecimal?

BigDecimal operations are the hotspots in our application and the GC is also
very busy collecting all the objects. Unfortunately double are not good
enough for us. Ideally we would like something like C# Decimal: a 128bit
decimal number (not floating point, but decimal), I have not actually used
this, but from what I have heard it is what we would need..

I googled the web for a fixed precision decimal class for Java, for an
immutable version of BigDecimal, etc... I could not find anything. Do you
know of anything that could help us?

Thanks,

Tommy




Closed Thread