[issue22464] Speed up fractions implementation
Stefan Behnel
report at bugs.python.org
Wed Sep 24 22:51:54 CEST 2014
Stefan Behnel added the comment:
I created issue 22486 about the gcd() performance. I think we can close this ticket - I don't see any more obvious low hanging fruit and future findings can have their own ticket.
Out of interest, I modified the fractions module to compile Fraction into an extension type with Cython. For the benchmark, it currently gives me a 10x speedup over the original fractions module in Py3.4. I uploaded my initial attempt to PyPI and it's on github:
https://pypi.python.org/pypi/quicktions
https://github.com/scoder/quicktions
That makes a C implementation of Fraction generally worth considering for CPython.
----------
resolution: -> fixed
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22464>
_______________________________________
More information about the Python-bugs-list
mailing list