You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use fmtlib in an embedded environment (Arm Cortex M4 w/64kB of code space). Adding a single use of fmtlib (fmt::format("the answer is {}", 42)), about 30kB of code is generated. This is after FMT_STATIC_THOUSANDS_SEPARATOR is used (otherwise over 100kB of code is generated) and appropriately configured toolchains.
Looking into it, I see that a large amount of code related to formatting floating point numbers is included, despite it not being used. Does anyone know why this might be?
The text was updated successfully, but these errors were encountered:
While I understand that some hypothetical compiler might come along and prove to itself that not all built-in types are actually formatted in some given program, wouldn't it be better for fmt::format to internally "dispatch", based on the types of arguments passed to it, to internal variants that each know how to format some subset of the available types?
In general it's not possible because format strings can be provided at runtime. However, it will be possible with format string compilation which is currently WIP.
I'm trying to use fmtlib in an embedded environment (Arm Cortex M4 w/64kB of code space). Adding a single use of fmtlib (fmt::format("the answer is {}", 42)), about 30kB of code is generated. This is after FMT_STATIC_THOUSANDS_SEPARATOR is used (otherwise over 100kB of code is generated) and appropriately configured toolchains.
Looking into it, I see that a large amount of code related to formatting floating point numbers is included, despite it not being used. Does anyone know why this might be?
The text was updated successfully, but these errors were encountered: