Skip to content

Commit 8f597f2

Browse files
committed
Don't use std for small strings if avx512 is compile-time selected.
1 parent 61d34b1 commit 8f597f2

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/implementation/x86/mod.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,6 @@ pub(crate) unsafe fn validate_utf8_basic(
156156
pub(crate) unsafe fn validate_utf8_basic(
157157
input: &[u8],
158158
) -> core::result::Result<(), crate::basic::Utf8Error> {
159-
if input.len() < super::helpers::SIMD_CHUNK_SIZE {
160-
return super::validate_utf8_basic_fallback(input);
161-
}
162-
163159
validate_utf8_basic_avx512(input)
164160
}
165161

@@ -363,10 +359,6 @@ pub(crate) unsafe fn validate_utf8_compat(
363359
pub(crate) unsafe fn validate_utf8_compat(
364360
input: &[u8],
365361
) -> core::result::Result<(), crate::compat::Utf8Error> {
366-
if input.len() < super::helpers::SIMD_CHUNK_SIZE {
367-
return super::validate_utf8_compat_fallback(input);
368-
}
369-
370362
validate_utf8_compat_avx512(input)
371363
}
372364

0 commit comments

Comments
 (0)