Message47130
Raymond:
Some minor modifications: max() instead of veryfing
which is greater and assigning it, and not passing prec
to _fixexponents() (not uses it).
Major change: Not use _WorkRep anymore! Changed
__add__, __mul__ and __divide__ to support it
(including the support functions _normalize() and
_adjust_coefficients). And of course, Decimal.__new__
does not support passing _WorkRep anymore, ;).
One change that may raise controversial: The syntax to
pass a tuple to __new__ now accepts also a number in
the second position. This is because in some places in
the code the result is just a number, and converting it
to a tuple in the code (and not in __new__) made
redundant some checks in __new__.
All the tests pass ok. The new code shows a 12% speed
up in test_decimal.py and 10% in the telco benchmark.
. Facundo |
|
Date |
User |
Action |
Args |
2007-08-23 15:40:20 | admin | link | issue1053375 messages |
2007-08-23 15:40:20 | admin | create | |
|