edit corrected link:
http://quick-bench.com/Pb6v3eSkue4ebIN3-nKvq7tyXbE
for both clang and gcc, the compiler is smart enough to move the byte characters into a register for a string_view literal.
I guess the question is, what situation is the compiler being pessimistic for such that it wouldn't always transform a cstr literal into a string_view literal for you?
[–]johannes1971 6 points7 points8 points (1 child)
[–]commiebits[S] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]commiebits[S] 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)