Major change in the internal structure of the Decimal

number: now it does not store the mantissa as a tuple
of numbers, but as a string.

This avoids a lot of conversions, and achieves a
speedup of 40%. The API remains intact.

Thanks Mark Dickinson.
This commit is contained in:
Facundo Batista 2007-11-23 17:59:00 +00:00
parent 90b5bc3a7d
commit 72bc54faed
2 changed files with 223 additions and 305 deletions

File diff suppressed because it is too large Load Diff

View File

@ -464,6 +464,7 @@ class DecimalExplicitConstructionTest(unittest.TestCase):
self.assertRaises(ValueError, Decimal, (1, (4, 3, 4, None, 1), 2) )
self.assertRaises(ValueError, Decimal, (1, (4, -3, 4, 9, 1), 2) )
self.assertRaises(ValueError, Decimal, (1, (4, 10, 4, 9, 1), 2) )
self.assertRaises(ValueError, Decimal, (1, (4, 3, 4, 'a', 1), 2) )
def test_explicit_from_Decimal(self):