dickinsm at gmail.com
Sat Jan 31 15:03:07 CET 2009
On Jan 31, 1:23 pm, Steve Holden <st... at holdenweb.com> wrote:
> > power operation. The integer -> float conversion is probably quite
> > significant, timewise.
> I bow to your superior intuition!
Here's another timing that shows the significance of the int -> float
conversion: (non-debug build of the trunk)
>>> t1 = timeit.Timer("x = n**power", "n = 4021503534212915433093809093996098953996019232; power = 1./13")
>>> t2 = timeit.Timer("x = n**power", "n = 4021503534212915433093809093996098953996019232.; power = 1./13")
I've got a patch posted to the tracker somewhere that improves
the accuracy of long->float conversions, while also speeding them
up a tiny bit (but not a lot...).
More information about the Python-list