!string(float) Is too heavy

Hipreme msnmancini at
Tue Oct 12 22:15:10 UTC 2021

On Tuesday, 12 October 2021 at 19:50:51 UTC, H. S. Teoh wrote:
> On Tue, Oct 12, 2021 at 07:08:44PM +0000, IGotD- via 
> Digitalmars-d wrote:
>> On Tuesday, 12 October 2021 at 18:06:53 UTC, Hipreme wrote:
>> > 
>> > Lot of people has implemented float to string conversion 
>> > without requiring 500KB.
>> Floats to string is of course more complicated that integers 
>> but 500KB is ridiculous. It should rather be something like 
>> 10-20 KB.
>> It's likely it is a combination of that the optimizer/linker 
>> is unable to remove unused functions. Also that imports 
>> usually imports more stuff, even if it is just a tiny function 
>> from another import.
>> It's like a box of cables, you just want one cable but when 
>> you pull out one cable you get the entire ball of cables.
> It'd be nice to untangle that ball of cables so that less 
> cables get pulled out when you tug at one (so to speak). :-D  
> We talked about pay-as-you-go modularization of Phobos at least 
> a few times, but so far, that ball of cables persist.
> T

I do hope that this gets noted by the decision people, having to 
reimplement stdlib is the last thing I wanted right now, but 
500KB for string to float conversion per module, (without debug 
symbols ) is pretty unacceptable.

More information about the Digitalmars-d mailing list