restore dtostrf when floats are disabled in printf/scanf + round fix by d-a-v · Pull Request #7093 · esp8266/Arduino

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the if (function pointer) is not optimized. Both branches are present in all builds (float and non-float). That gives a 554-byte function in both cases. In normal mode, ~500 of those bytes are never used (the __dtostrf inlined code), and in non-float mode ~50 of those aren't used (the printf() branch).

I think this may be the best we can hope for, without adding a new #define like your original PR, so I'm approving as-is. If someone else has any ideas, I'd be interested...