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 jyasskin
Recipients facundobatista, gvanrossum, jyasskin, mark.dickinson, ncoghlan, rhettinger
Date 2008-02-18.22:51:04
SpamBayes Score 0.16430695
Marked as misclassified No
Message-id <>
1) No worries. Even without inlining the common case of __add__, etc.,
Fraction is now faster than Decimal for smallish fractions
[sum(Fraction(1, i) for i in range(1, 100))], and for large ones
[sum(Fraction(1, i) for i in range(1, 1000))] gcd takes so much of the
time that I can't see the effects of any of the optimizations I've made.
Since I wasn't thinking of this as a high-performance class, I'm taking
that as a sign to stop optimizing, but gcd is definitely the function to
tackle if anyone wants to keep going.

2) I haven't been following __format__, but adding it to Rational sounds
fine to me.
Date User Action Args
2008-02-18 22:51:06jyasskinsetspambayes_score: 0.164307 -> 0.16430695
recipients: + jyasskin, gvanrossum, rhettinger, facundobatista, mark.dickinson, ncoghlan
2008-02-18 22:51:06jyasskinsetspambayes_score: 0.164307 -> 0.164307
messageid: <>
2008-02-18 22:51:05jyasskinlinkissue1682 messages
2008-02-18 22:51:04jyasskincreate