On Sun, Sep 13, 2020 at 11:36 AM Thiago Macieira via Std-Proposals <std-proposals@lists.isocpp.org> wrote:
On Sunday, 13 September 2020 11:08:17 PDT Nikolay Mihaylov wrote:
> however, the compiler knows what strcmp is , so if you do
> strcmp(a.c_str(), b.c_str()) == 0;

No, you can't. That's not the same as the *correct* memcmp.

On a modern processor, strcmp is also much slower than memcmp.  See https://godbolt.org/z/a6W8ff for an example of how fast it can be to compare equality to an 8-character string.