![]() |
|
Message-ID: <CAA2zVHqdwA9-ChOr-v3WLrUDiwZuTTsq5gs+CnuQMJpF_Mqwcw@mail.gmail.com>
Date: Thu, 13 Jun 2024 12:03:53 -0400
From: James Y Knight <jyknight@...gle.com>
To: musl@...ts.openwall.com
Cc: "Ram Nalamothu (QUIC)" <quic_vnalamot@...cinc.com>
Subject: Re: Integer only print functions support in MUSL
On Wed, Jun 12, 2024 at 9:06 PM Rich Felker <dalias@...c.org> wrote:
> But to get back to the point, on archs that are hard-float and don't
> have an oversized soft-only long double, the size of the floating
> point code in printf is around 6k.
Indeed. A particular example small emscripten program which doesn't call
printf produces a 14450-byte output file.
Adding a call to `printf("%d\n", 0)` (which is optimized to a call to
iprintf by the compiler):
increases output size by 5769 bytes.
Adding a call to `printf("%f\n", 0.0)`, using the default emscripten
printf, which has been modified to only support 'double' precision output:
increases output size by 8413 bytes (2644 bytes more than the iprintf
version).
Adding a call to `printf("%f\n", 0.0)`, using "-s PRINTF_LONG_DOUBLE"
config option (thus enabling printf support for proper output of a 128-bit
'long double' type):
increases output size by 13067 bytes (7298 above the iprintf version).
The 128-bit long double uses a soft-float implementation.
Content of type "text/html" skipped
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.