in reply to Re^2: Is there something faster than string concatenation?
in thread Is there something faster than string concatenation?
The size of the string buffer is doubled when it needs to be increased. So even if it has to be copied every time it is resized, that averages out to the equivalent of just one extra copying of the final string. So it isn't a big penalty.
Update: What is true of arrays need not be true of strings, it appears. Thanks, ikegami.
- tye
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Is there something faster than string concatenation? (hermit crabs)
by ikegami (Patriarch) on Dec 03, 2007 at 07:37 UTC | |
by eyepopslikeamosquito (Archbishop) on Dec 03, 2007 at 11:23 UTC | |
by tye (Sage) on Dec 03, 2007 at 19:21 UTC | |
by Joost (Canon) on Dec 03, 2007 at 12:59 UTC |