Stefan Behnel added the comment:

> Any optimization requires a benchmark. What is the speedup?

I gave numbers in ticket #22464.

"""
Since many Fraction input values can already be normalised for some reason, the 
following change shaves off almost 30% of the calls to 
PyNumber_InPlaceFloorDivide() in the telco benchmark during Fraction 
instantiation according to callgrind, thus saving 20% of the CPU instructions 
that go into tp_new().
"""

I then proposed to move this into the PyLong type in general, rather than 
letting Fraction itself do it less efficiently.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22501>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to