Stefan Krah added the comment: Previously the method was rejected in #8947. But the speedup is quite dramatic. This is a benchmark for converting "1.91918261298362195e-100", 1000000 repetitions:
float.as_integer_ratio: 0.548023 Decimal.as_integer_ratio: normalize=False: 2.661191 Decimal.as_integer_ratio: normalize=True: 4.382903 Fraction.from_decimal: 29.436584 ---------- nosy: +belopolsky, rhettinger _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25928> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com