All modern CPU architectures have builtin fast string compare instructions.
Here is a table from the Intel manual (bolded are the relevant compare instructions):
https://msdk.intel.com/en-us/library/cc286809.aspx
> SSE-4.2: Compare strings using dqa (32-bit mode), dqq (64-bit mode), dqu, dsx
> SSE-3: Compare strings using cmpsdx, cmpsd, scansigndx, scansignd
> SSE-2: Compare strings using pmaxsw, pand, pmin, pmins
> SSE-1: Compare strings using pandn, pavg, pandnpand, pandnpandn, pandn, pandnpandndivr, ...