[Python-Dev] C Decimal - is there any interest?
Mateusz Rukowicz
mateusz.rukowicz at vp.pl
Tue Oct 16 22:19:20 CEST 2007
Grzegorz Makarewicz wrote:
>
>Python in high aritmetic - nice, but in standard ? - using computation
>effective representation as in this "demand" should be put as *must*
>have ? in standard python ? - decimal with it's speed is sufficient - if
>U need more speed use more spohisticated data structures - numpy/scipy
>... - I dont like those additions to python standard.
>
>
>
>
First of all C Decimal isn't meant to be substitute to numpy in any way.
Second of all, I don't think numpy/scipy is an alternative to Decimal -
it is more complicated, and I am not even sure if it supports Decimal
arithmetic (which is crucial for financial application ie.).
[I couldn't find on google whether scipy supports decimal arithmetic, so
I assumed it doesn't because of name '*scientific* tools for python'.
However, if it supports - ignore following text block]
I bet most computation using Decimal are made with precision < 20, in
that case, you might say 'if you need more performance, use built in
double' - it's performance is superior to Decimal, and precision is the
same, but that's not what all is about. So if one needs Decimal
arithmetic (mostly financial applications), and Py Decimal is not enough
- then pretty big problem arises. And that's why C Decimal is for IMHO :).
>if U need more speed use more spohisticated data structures - numpy/scipy
Why use more sophisticated data structure if less sophisticated, but
written in C is enough?
One more thing - C Decimal is being written such way, that moving from
Py Decimal to C Decimal needs very little to no effort. You cannot say
it about moving from Decimal to some other, more sophisticated libraries.
Anyway - thanks for opinion ;>
More information about the Python-Dev
mailing list