Skip to content

Codesize of strtod/strtof/strtold is unreasonable large #51

@th-otto

Description

@th-otto

The code produced by those functions is about 9k each (a bit less for the -m68881 version). All three are referenced eg. by the scanf family of functions. Together with some floating support functions from libgcc.a, that alone adds about 30k of code to executables.

I think the current implementation (in strtod.c) is almost identical to the original one from glibc. I also think that most of the code is produced by the inlined mpn_* functions from gmp. So the question is: can that be reimplemented without gmp? I never understood why we need functions that can work on arbitrary long doubles, when we only have to work with a max. of 3 different, known sizes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions