Mark Dickinson added the comment:
> 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))
run("test1()")
#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
callees.
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1682>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com