This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients josh.r, mark.dickinson, scoder, serhiy.storchaka
Date 2018-12-28.17:57:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1546019851.89.0.767492621328.issue35588@roundup.psfhosted.org>
In-reply-to
Content
Using divmod() makes the case of small integers 2-3% slower, but makes the case of large integers more significantly faster. And since the code with divmod() is simpler, I think it is worth to use it.

The Fraction class also serves educational goals. The simpler code is better. The proposed patch makes the code slightly more complex, but not too much. I think it's an affordable price for such degree of speed up.
History
Date User Action Args
2018-12-28 17:57:33serhiy.storchakasetrecipients: + serhiy.storchaka, mark.dickinson, scoder, josh.r
2018-12-28 17:57:31serhiy.storchakasetmessageid: <1546019851.89.0.767492621328.issue35588@roundup.psfhosted.org>
2018-12-28 17:57:31serhiy.storchakalinkissue35588 messages
2018-12-28 17:57:31serhiy.storchakacreate