[LLVMdev] Correct use of StringRef and Twine

Chris Lattner
Wed, 20 Jul 2011 02:01:10 -0000

On Jul 19, 2011, at 10:44 AM, David Blaikie wrote:

>> Problem is, there are REALLY bad std::string implementations out there
in
>> widely used c++ runtimes.
>
> No doubt - though widely used to build llvm/clang? Perhaps, I suppose,
> I'm not sure just how portable llvm code is.

GCC's libstdc++ std::string implementation (as of GCC 4.2, but I doubt
they've fixed it recently due to ABI concerns) is COW (and thus does atomic
accesses) with no short-string optimization.  It's brutally slow.

-Chris