Memory footprint of StringZilla
MalteEbner opened this issue · 2 comments
MalteEbner commented
Do you have any benchmarks and comparisons of the memory footprint of Stringzilla?
As some examples:
- saving a string with 1Mio chars as
stringzilla.Str
vs a pythonstr
- saving many strings, e.g. 1Mio strings with 50 chars each as
python list[str]
list[stringzilla.Str]
stringzilla.Strs
In the case of stringzilla.Strs:
What is their behavior when reading from them with multiprocessing? Will they be copied on read or not?
ashvardanian commented
Valid concerns! In the first case you won’t feel the difference. In the second case, the behavior will vary depending on the platform, and may be suboptimal, depending on the C++ shared_ptr implementation. As for the last part - the strings won’t be copied.
MalteEbner commented
Thanks for the answer!