Showing content from http://mail.python.org/pipermail/python-dev/attachments/20080326/fe751adb/attachment.htm below:
<div class="gmail_quote">On Wed, Mar 26, 2008 at 2:57 AM, Nick Coghlan <<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Greg Ewing wrote:<br>
> I thought Decimal was going to be replaced by a C<br>
> implementation soon anyway. If so, is it worth going<br>
> to much trouble over this?<br>
><br>
<br>
</div>I believe that was found to be more trouble than it was worth. So the<br>
optimisations focused on various ways of making the Python<br>
implementation more efficient.<br>
</blockquote><div><br>I think it's still worth considering a hybrid implementation of Decimal:<br>C code for the basic integer arithmetic (that is, supply a long int<br>replacement whose underlying implementation works in base a<br>
power of 10), and Python for all the complicated logic (dealing<br>with flags, special values, etc.). This will speed things up in the<br>usual cases, and also give everything the right asymptotics for<br>those few people using Decimal to do really high precision arithmetic. <br>
(Right now, addition of two Decimals takes quadratic time.)<br><br>The decimal long integer implementation is already in the sandbox,<br>so this probably isn't as much work as it sounds. I won't have time<br>for it until May, though.<br>
<br>Mark<br></div></div><br>
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