[LLVMdev] Correct use of StringRef and Twine

FlyLanguage
Tue, 19 Jul 2011 17:37:29 -0000

> curiosity question: how much more efficient (vague question, I know)
> is the StringRef + SmallVector than a good (eg: libc++) std::string
> implementation? I know, for example, that Visual C++ 2010's
> std::string does perform the small string optimization which I guess
> is what SmallVector is doing.
>
> - David

Problem is, there are REALLY bad std::string implementations out there
in widely used c++ runtimes.

StringRef/Twine is efficient everywhere.