|
You are here |
www.bfilipek.com | ||
| | | | |
disq.us
|
|
| | | | | In this text we'll have a look at a few examples that compare std::string_view against std::string. How much is std::string_view faster than standard std::string operations? Intro I was looking for some examples of string_view, and after a while, I got curious about the performance gain we might get. string_view is conceptually only a view of the string: usually implemented as[ptr, length]. | |
| | | | |
www.cppstories.com
|
|
| | | | | How do you initialise a string member in the constructor? By using const string&, string value and move, string_view or maybe something else? Let's have a look and compare possible options. Intro Below there's a simple class with one string member. We'd like to initialise it. For example: class UserName { std::string mName; public: UserName(const std::string& str) : mName(str) { } }; As you can see a constructor is taking const std::string& str. | |
| | | | |
www.cppstories.com
|
|
| | | | | C++11 conformance GCC 4.81 - 100% Clang 3.3 - 100% Intel 14.0 - 84% Visual C++ 2013 - 66% Another year is almost over so it is a good time to check what is going on with C++. This time more stats and real data compared to my post from the previous year. | |
| | | | |
squanderingti.me
|
|
| | | Exploring the innards of an ELF binary to find the physical location of main. | ||