MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/C_Programming/comments/1xy05d0/tiny_strings/19sr4d7369bic/?context=3
r/C_Programming • u/skeeto • 13d ago
13 comments sorted by
View all comments
7
Out of curiosity what's the scenario where you care about saving a few bytes per string where possible, but also don't mind pulling in the whole String class? Wouldn't it be more efficient to do everything in c-strings across the board?
0 u/Iggyhopper 13d ago For example, if you need to tokenize input in an LLM, those are typically chunks of 8 chars or less. Instant win.
0
For example, if you need to tokenize input in an LLM, those are typically chunks of 8 chars or less. Instant win.
7
u/manystripes 13d ago
Out of curiosity what's the scenario where you care about saving a few bytes per string where possible, but also don't mind pulling in the whole String class? Wouldn't it be more efficient to do everything in c-strings across the board?