unsafe fn small_slice_eq(x: &[u8], y: &[u8]) -> bool🔬This is a nightly-only experimental API. (
pattern #27721)Available on AArch64 and target feature
neon, or LoongArch64 and target feature lsx, or x86-64 and target feature sse2 only.Expand description
Compares short slices for equality.
It avoids a call to libc’s memcmp which is faster on long slices due to SIMD optimizations but it incurs a function call overhead.
§Safety
Both slices must have the same length.