HomePhabricator

Default raw_string_ostream to be unbuffered

Authored by bkramer on Apr 26 2020, 3:45 AM.

Description

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.

Details

Committed
bkramerApr 26 2020, 3:45 AM
Parents
rG9caac56a65cf: [TableGen] Delete unused Record::resolveReferencesTo() after D44478. NFC
Branches
Unknown
Tags
Unknown