What's the alternative to string streams for building strings pieces by pieces in C++? Plain old string concatenation? Asking for a friend... I should run benchmarks I guess.
If you really need speed, then estimate how large string you need in advance and preallocate it (either with new char[], or string::reserve ig).