I think it's worth to still check the pointers before calling memcmp as this is really hot code.