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 mark.dickinson
Recipients facundobatista, gvanrossum, jyasskin, mark.dickinson, ncoghlan, rhettinger
Date 2008-02-12.22:15:57
SpamBayes Score 0.49274343
Marked as misclassified No
Message-id <>
> BTW I think the next goal should be to reduce the cost of constructing
> a Fraction out of to plain ints by at least an order of magnitude. I
> believe this is possible.

I certainly hope so!  Here's a very simple (and simplistic) benchmark:

# start benchmark

from fractions import Fraction
from cProfile import run

def test1():
    return sum(Fraction(1, n*n-1) for n in xrange(2, 100000))


#end benchmark

On my MacBook this reports a total time of 38.072 seconds, with 22.731 of 
those (i.e. around 60%) being spent in abc.__instancecheck__ and its 
Date User Action Args
2008-02-12 22:15:59mark.dickinsonsetspambayes_score: 0.492743 -> 0.49274343
recipients: + mark.dickinson, gvanrossum, rhettinger, facundobatista, ncoghlan, jyasskin
2008-02-12 22:15:59mark.dickinsonsetspambayes_score: 0.492743 -> 0.492743
messageid: <>
2008-02-12 22:15:58mark.dickinsonlinkissue1682 messages
2008-02-12 22:15:57mark.dickinsoncreate