Author scoder
Recipients mark.dickinson, scoder, serhiy.storchaka
Date 2014-09-22.19:46:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1411415215.74.0.341184090034.issue22464@psf.upfronthosting.co.za>
In-reply-to
Content
Benchmark profile after the patch:

         5930670 function calls (5930288 primitive calls) in 3.748 seconds

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
   519632    0.828    0.000    0.828    0.000 fractions.py:17(gcd)
   519644    0.806    0.000    1.700    0.000 fractions.py:73(__new__)
   319744    0.630    0.000    1.983    0.000 fractions.py:408(_add)
        4    0.393    0.098    3.735    0.934 bm_telco_fractions.py:38(run)
   519616    0.277    0.000    3.316    0.000 fractions.py:381(forward)
   199872    0.275    0.000    0.901    0.000 fractions.py:424(_mul)
  1598720    0.161    0.000    0.161    0.000 fractions.py:285(denominator)
   520257    0.155    0.000    0.155    0.000 {built-in method isinstance}
   959232    0.118    0.000    0.118    0.000 fractions.py:281(numerator)
   519657    0.066    0.000    0.066    0.000 {built-in method __new__ of type object at 0x9d1c40}

Note that the gcd() call inside of __new__() now takes about as much time as the rest of the __new__() itself. It's clearly still worth optimising that.
History
Date User Action Args
2014-09-22 19:46:55scodersetrecipients: + scoder, mark.dickinson, serhiy.storchaka
2014-09-22 19:46:55scodersetmessageid: <1411415215.74.0.341184090034.issue22464@psf.upfronthosting.co.za>
2014-09-22 19:46:55scoderlinkissue22464 messages
2014-09-22 19:46:55scodercreate