[issue22458] Add fractions benchmark
Stefan Krah
report at bugs.python.org
Fri Sep 2 07:45:24 EDT 2016
Stefan Krah added the comment:
I've left comments on GitHub.
[scoder]
> As I said, where ever exact calculations are needed..
Even if the formatting comment is addressed, the main problem with
this benchmark is that *both* fraction and decimal calculations
are in fact exact here.
You can check that by printing out the values for "t" in the loop
like I suggested on GitHub.
This is of course one of the main features of Decimal: If you're
willing to take the penalty of a large precision, calculations
can often be exact; similar to taking the penalty of potentially
huge numerators and denominators in fractions.
So this benchmark cannot be used to show the superiority of exact
fractions.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22458>
_______________________________________
More information about the Python-bugs-list
mailing list