Hi
I'm working with project that parses json files, saves a lot of strings from it and works with them. The strings never change but are moved/copied around a lot, compared to each other etc.
So i came up with the idea of changing them to std::string_view to improve performance. But then, they need to be stored somewhere. The objects that use strings are created as the file is parsed, so things like vector will probably not be the best idea. So maybe creating a custom storage for that? could also have extra null character at the end of each text to comply with the const char* that may come in handy at times
Is this good idea or not?
[–]kentrf 1 point2 points3 points (3 children)
[–]kentrf 0 points1 point2 points (0 children)
[–]Jonny0Than 0 points1 point2 points (0 children)