homepage

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 scoder
Recipients mark.dickinson, scoder, serhiy.storchaka
Date 2014年09月22日.21:11:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1411420305.84.0.0186675796744.issue22464@psf.upfronthosting.co.za>
In-reply-to
Content
Here is another little optimisation that removes the redundant property lookups for the denominator in __add__() and __sub__().
New profile:
 5291182 function calls (5290800 primitive calls) in 3.596 seconds
 Ordered by: internal time
 ncalls tottime percall cumtime percall filename:lineno(function)
 519632 0.843 0.000 0.843 0.000 fractions.py:17(gcd)
 519644 0.800 0.000 1.709 0.000 fractions.py:73(__new__)
 319744 0.520 0.000 1.816 0.000 fractions.py:408(_add)
 4 0.401 0.100 3.582 0.896 bm_telco_fractions.py:38(run)
 519616 0.291 0.000 3.156 0.000 fractions.py:381(forward)
 199872 0.274 0.000 0.904 0.000 fractions.py:424(_mul)
 520257 0.145 0.000 0.145 0.000 {built-in method isinstance}
 959232 0.108 0.000 0.108 0.000 fractions.py:285(denominator)
 959232 0.108 0.000 0.108 0.000 fractions.py:281(numerator)
 519657 0.066 0.000 0.066 0.000 {built-in method __new__ of type object at 0x9d1c40}
History
Date User Action Args
2014年09月22日 21:11:45scodersetrecipients: + scoder, mark.dickinson, serhiy.storchaka
2014年09月22日 21:11:45scodersetmessageid: <1411420305.84.0.0186675796744.issue22464@psf.upfronthosting.co.za>
2014年09月22日 21:11:45scoderlinkissue22464 messages
2014年09月22日 21:11:45scodercreate

AltStyle によって変換されたページ (->オリジナル) /