[LLVMdev] Correct use of StringRef and Twine

FlyLanguage flylanguage at gmail.com
Tue Jul 19 10:37:29 PDT 2011


> 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.



More information about the llvm-dev mailing list