[Python-ideas] Floating point contexts in Python core
Sturla Molden
sturla at molden.no
Fri Oct 12 12:39:37 CEST 2012
On 12.10.2012 03:03, Steven D'Aprano wrote:
> Any half-decent processor supports the IEEE-754 standard. If it doesn't,
> it's broken by design.
>
> Even in user-space, you're not giving up that much speed in practical
> terms, at least not for my needs. The new decimal module in Python 3.3 is
> less than a factor of 10 times slower than Python's floats, which
makes it
> pretty much instantaneous to my mind :)
I will not have any effect on the flops rate. The other stuff the
interpreter must do when using floats (allocating and deleting float
objects on the heap, initializing new objects, etc.) will dominate the
run-time performance. Even a simple check for divide-by-zero (as we have
today) will be more expensive than using another numerical context
inside the hardware.
Sturla
More information about the Python-ideas
mailing list