|
|
Le_Forgeron <jgr### [at] freefr> wrote:
> Btw, there is, in current main branch, an array sized by
> MAX_STRING_LEN_FAST, so this increase to 65536 is not a good idea at
> all. And limiting fast string to 256 is really what is intended (fast
> string is used for token, you do not want to type a 10235 charaters long
> identifier anyway). It's just the slower string that must be unbounded.
> (as long as your C++ memory allows it)
If MAX_STRING_LEN_FAST is used for an array, then it's indeed not a
very good idea to set it to 65536 because it would mean that even
single-character strings would start consuming that much RAM.
Using std::string for all strings is probably a very viable option.
Most std::string implementations nowadays use short string optimization
(although there are probably a few exceptions), so they are very
efficient for short strings, and probably what MAX_STRING_LEN_FAST
is already doing.
--
- Warp
Post a reply to this message
|
|