A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-March/043796.html below:

[Python-Dev] Expert floats

[Python-Dev] Expert floatsBatista, Facundo FBatista at uniFON.com.ar
Wed Mar 31 08:16:48 EST 2004
Andrew P. Lentvorski, Jr. wrote:

#- > The only thing Decimal will have against it in the end is 
#- runtime sloth.
#- 
#- While the Decimal implementation is in Python, certainly.
#- 
#- However, I did some floating point calculation timings a 
#- while back, and
#- the Python FP system is slow due to the overhead of working 
#- out types,
#- unpacking the values, and repacking the value.  The actual native
#- calculation is a small portion of that time.
#- 
#- My question is: Is it possible that a C implementation of 
#- Decimal would be
#- almost as fast as native floating point in Python for 
#- reasonable digit
#- lengths and settings? (ie. use native FP as an approximation 
#- and then do
#- some tests to get the last digit right).

While I'll do my best to keep Decimal fast, I'll first make it usable. As
Aahz used to put in his signature, it is easier to optimize correct code
than to correct optimized code.

Anyway, I still don't know how slower is Decimal than built-in binary
floating point.

.	Facundo

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4