2 ms·
The problem with Python strings is that innocuous operations can occasionally cause drastic memory usage ballooning. A simple string append can, for instance,
by TheLoneWolfling 11y ago
The problem with Python strings is that innocuous operations can occasionally cause drastic memory usage ballooning.
A simple string append can, for instance, require up to 5x the memory consumed by the string.
Worse, this problem will only show up if someone ever enters in a high enough code point. Better hope any user-defined data never gets turned into part of a large string at any point, or you have a potential memory problem down the line.