[LLVMdev] Correct use of StringRef and Twine

Chris Lattner clattner at apple.com
Tue Jul 19 19:01:10 PDT 2011

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.


More information about the llvm-dev mailing list