4 ms·
The problem with C++ strings for embedded is the heavy dependence on the heap for many operations and the constant copying of ROM literals into RAM objects. If
by kevin_thibedeau 2y ago
The problem with C++ strings for embedded is the heavy dependence on the heap for many operations and the constant copying of ROM literals into RAM objects. If your target platform is "embedded" with 1GiB+ RAM then you can work in systems programming mode and not care. If it's 32KiB, a heap may be too much of a liability.
- Thorrez 2y agoI think you can probably avoid unnecessary copies by using std::string_view where possible instead of std::string .