You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This sounds more like a variant of memcmp. memcmp has to do a serial match of the byte arrays otherwise it can't return >< or =.
Memeq can use any strategy and doesn't need to be linear so the first difference it finds may not be the first difference between the arrays.
memeq returns a
bool
, but it seems sometimes it'd be useful to know the position of the mismatch.Asked about this couple of years ago, and today was asked about this again:
https://users.rust-lang.org/t/how-to-find-common-prefix-of-two-byte-slices-effectively/25815/2
The text was updated successfully, but these errors were encountered: