[issue22458] Add fractions benchmark
Stefan Krah
report at bugs.python.org
Fri Sep 2 12:38:50 EDT 2016
Stefan Krah added the comment:
The reason is that the benchmark is a softball for fractions. Using the fastest fraction implementation (gmpy.mpq) and the best printing method for both types, gmpy.mpq seems to be about 2.5 to 3 times slower than decimal.
It is however easy to generate benchmarks where mpq is 3000 times slower, depending on how many prime factors accumulate in the denominator.
Fractions will shine in most benchmarks where decimal is exact anyway.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22458>
_______________________________________
More information about the Python-bugs-list
mailing list