[Python-Dev] C Decimal - is there any interest?

Mateusz Rukowicz mateusz.rukowicz at vp.pl
Tue Oct 16 23:57:42 CEST 2007


Facundo Batista wrote:

>2007/10/15, Mateusz Rukowicz <mateusz.rukowicz at vp.pl>:
>  
>
>Welcome back, :)
>  
>
Hi :>

>>merging C Decimal with main tree are much lower than year ago, so I
>>would like to know if there is still interest in C version of Decimal.
>>If so - should I write PEP, or just code and 'we'll see later'?
>>    
>>
>
>First of all you need to address some issues raised by some people
>here after you finished your work last year. I remember of Raymond
>Hattinger, but maybe there were others.
>  
>
Yes, I remember Raymond's points about C Decimal, and I keep them in 
mind. Mainly it was about implementation being too much python dependent 
- and because of that code complexity and performance. Fortunately, the 
code is written such way (mainly thanks to Georg Brandl and Jack 
Diedrich, who started project), that in my opinion, modifications of 
context, and other highly-python dependent parts are pretty easy - these 
changes are open to discussion (but not yet though). Complexity - I 
tried to do my best, but I am aware that there are parts which are hard 
to understand and/or are miscommented. I will gradually improve that.
I've been searching few weeks ago for other opinions, but I haven't 
found anything.

>After that, you should update the C version to comply the spec in its
>last version.
>  
>
That's what I am doing now.

>I will prepare, just for decimal.py, a benchmark that is a mix of all
>operations and use (a mix of common operations like add, not so used
>ones like log10, context switching, exceptions raised, etc).  You can
>use this if you want, to measure also the difference in speed from Py
>to C. Note, however, that you need to update it first for the last
>spec.
>  
>
Great :>.





More information about the Python-Dev mailing list