Binary size overhead from std::locale
#364
Replies: 2 comments 3 replies
-
@CrustyAuklet Aside, are you building in release or debug in this case? |
Beta Was this translation helpful? Give feedback.
-
I noticed this morning that the bianry bloat happens even with no added code, so it had to be a The only one causing issues with my specific includes was in
|
Beta Was this translation helpful? Give feedback.
-
This might be out of scope for the library, but I thought I would start a discussion. I've been looking at this library for our larger systems but got really excited when you mentioned using it in embedded systems on cpp weekly. My main use in embedded is just to provide a JSON pointer interface over serial to c++ structured data, just get/set really. So I tried adding just the minimal to get that feature and see what happened.
This addition took my MCU from 30% code space to 95%. Diff output of bloat below,
and you can see it's due to locale. I could tell just from the size difference since I have been
experimenting with using std::streambuf recently and it has the same locale issue.
I haven't dug into the blaze code, but from my iostream experimentation I know any instantiation
of an iostream type will drag in std::locale and instantly bloat the binary by ~170KB.
Beta Was this translation helpful? Give feedback.
All reactions