3 ms·
Those replace calls are growing the strings--one character is being replaced by several. That has the potential for re-allocation in any language, depending on
by lmkg 5y ago
Those replace calls are growing the strings--one character is being replaced by several. That has the potential for re-allocation in any language, depending on how much spare space is present. Unless the optimizer is smart enough to figure out the space characters are never used because they're splitting points.