Default raw_string_ostream to be unbuffered
raw_string_ostream can just use the std::string as a buffer. The buffer requirement came from the days when the minimum buffer size was 128 (fixed in 2015) and std::string was non-SSO. Now we can just use the inline capacity for small things and on a good growth strategy later. This assumes that the standard library isn't doing something bad like only growing to the exact size. I checked some common implementations and they grow by 2x (libc++) or 1.5x (msvc) which is reasonable. We should still check if this incurs any performance regressions though.
Loading
Please register or sign in to comment