[issue12450] Use the Grisu algorithms to convert floats to strings

Eric V. Smith report at bugs.python.org
Thu Jun 30 12:01:17 CEST 2011


Eric V. Smith <eric at trueblade.com> added the comment:

I see the problems as:

1. Given Python's other overhead, we'd need to profile to show an improvement in the speed of this conversion would make a noticeable impact on any import workload.

2. If we want to keep the shortest-float-repr property for all possible doubles, we'd need to use Grisu3 but still keep our existing code for the fallback cases. This is a big increase in the complexity of an already complex piece of code.

I'm not saying don't switch to Grisu2 or use Grisu3 with the fallback to existing code: maybe the speed improvements are worth it, maybe we can say we we can live with 99.5% shortest repr coverage, or maybe the complexity is worth it. I just want to record the issues here.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12450>
_______________________________________


More information about the Python-bugs-list mailing list