You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Optimize the Fraction class arithmetics for small components #91851
After #24779 there are some speed regressions, which can be solved by using private attributes in magic methods.
Also, right now the fractions module code is using sometimes private attributes (_numerator and _denominator, e.g. in the __int__) and sometimes - public (numerator and denominator, e.g. in the __floor__). This looks not very consistent, at least.
Activity
gh-91851: Trivial optimizations in Fraction (#100791)
gh-91851: Micro optimizations for arithmetic between Fractions (#25518)