[Python-Dev] Numerical robustness, IEEE etc.

Fredrik Lundh fredrik at pythonware.com
Wed Jun 21 16:51:53 CEST 2006


Nick Coghlan wrote:
>> BTW, prove me Decimal is not fast enough, ;)
>> C:\Python24>python -m timeit -s "x = 1.0" "x+x"
> 10000000 loops, best of 3: 0.137 usec per loop
>> C:\Python24>python -m timeit -s "from decimal import Decimal as d; x = d(1)" "x+x"
> 10000 loops, best of 3: 48.3 usec per loop
>> I don't really know my definition of 'fast enough to be the basic floating 
> point type', but I'm pretty sure that a couple of orders of magnitude slower 
> isn't it.

how fast does the corresponding C program run ?
</F>


More information about the Python-Dev mailing list

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