8
Does anyone has an idea what will be the fastest way of a string comparison for strings with exactly 6 chars ?
My idea is the following:
inline bool jfStrEq6(const char *s1, const char *s2)
{
uint64_t s1ui64 = *((uint64_t *)s1);
uint64_t s2ui64 = *((uint64_t *)s2);
return (s1ui64 & 0x0000ffffffffffff) == (s2ui64 & 0x0000ffffffffffff);
}