TLDR: One day, I was like, oh! I can just use std::string as a return because SSO will take place, but then immediately I was like, but SSO still won’t be as fast as a const char *

So I wanted to see what the actual difference was.

Links:

When are temporary objects destroyed?

Quick Bench:

Quick Bench

God Bolt Comparison