[prev in list] [next in list] [prev in thread] [next in thread] 

List:       velocity-dev
Subject:    RE: [PATCH / PROPOSAL] number support / was not correct (in some way :)
From:       "Peter Romianowski" <megapero () gmx ! de>
Date:       2002-11-04 13:33:17
[Download RAW message or body]

>   Things could speed up, if we only use BigDecimal if at 
> least one of the Operands is a BigDecimal or BigInteger. For 
> the more common case, that both are "normal" Number-types, we 
> could use "normal" operations. But to answer the question: I did some 
> profiling, that showed that using the BigDecimal would be 
> faster when having some amount of BigXXX as operands. But as 
> said before it may be likely uncommon to have BigXXX as 
> operands so I was wrong with this assumption. So splitting 
> the operations up into "uses at least one BigXXX-operand" and 
> "uses only 'normal'-types" would
> *really* speed up things. Just wanted to make the first 
> proposal as simple as possible, though...

  To be continued... Another reason for using BigDecimals was
that I don't have to care about overflows. So if we would implement
the proposal I gave in the upper paragraph, then extra overflow
checking would be needed. I don't know how this would affect 
performance... For the first "patch" or "proposal" I would love
to keep it as simple as possible. Implementing all these special
cases for speed could be done later, if the code has been proven
as robust.

Peter


--
To unsubscribe, e-mail:   <mailto:velocity-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-dev-help@jakarta.apache.org>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic