@@ -170,19 +170,7 @@ pub unsafe fn compare_bytes(a: *const u8, b: *const u8, n: usize) -> i32 {
170
170
let c4 = |a : * const u32 , b, n| cmp ( a, b, n, c2) ;
171
171
let c8 = |a : * const u64 , b, n| cmp ( a, b, n, c4) ;
172
172
let c16 = |a : * const u128 , b, n| cmp ( a, b, n, c8) ;
173
- let c32 = |a : * const [ u128 ; 2 ] , b, n| cmp ( a, b, n, c16) ;
174
- // [u128; 2] internally uses raw_eq for comparisons, which may emit a call to memcmp
175
- // above a certain size threshold. When SSE2 is enabled this threshold does not seem
176
- // to be reached but without SSE2 a call is emitted, leading to infinite recursion.
177
- //
178
- // While replacing [u128; 2] with (u128, u128) fixes the issues it degrades performance
179
- // severely. Likewise, removing c32() has a lesser but still significant impact. Instead the
180
- // [u128; 2] case is only enabled when SSE2 is present.
181
- if cfg ! ( target_feature = "sse2" ) {
182
- c32 ( a. cast ( ) , b. cast ( ) , n)
183
- } else {
184
- c16 ( a. cast ( ) , b. cast ( ) , n)
185
- }
173
+ c16 ( a. cast ( ) , b. cast ( ) , n)
186
174
}
187
175
188
176
/// Determine optimal parameters for a `rep` instruction.
0 commit comments