Re:Performance Improvement with the StringBuilder for C++
by gngeal on Friday September 06, 2013 @02:49PM
(#6341997)
I don't see how branch prediction and caches could dominate performance of logically concatenating a huge amount of text instead of doing it physically.
[ Parent
| on HN ]
Re:Performance Improvement with the StringBuilder for C++
by dkersten on Friday September 06, 2013 @03:16PM
(#6342119)
I guess it depends on what other operations you need. If the only operation you need is concatenation then trees are definitely faster. Otherwise it depends.
Re:Performance Improvement with the StringBuilder for C++
by lucian1900 on Saturday September 07, 2013 @01:45PM
(#6345789)
Arrays and copies are often faster than the equivalent structure-sharing trees, under a certain size at least.