From 5e412475b42aeca2d0232f2491ef1455dc2770ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Wed, 29 Jan 2025 00:54:50 -0300 Subject: [PATCH] Disable String::isAscii SIMD optimization for the lack of proper compiler support :'( --- src/eepp/core/string.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/eepp/core/string.cpp b/src/eepp/core/string.cpp index 02d22edd9..48b9bc8d8 100644 --- a/src/eepp/core/string.cpp +++ b/src/eepp/core/string.cpp @@ -1261,18 +1261,18 @@ bool String::isAscii() const { size_t len = mString.size(); size_t i = 0; -#ifdef EE_STD_SIMD - using simd_type = simd::native_simd; - constexpr size_t simd_size = simd_type::size(); - const simd_type ascii_limit = 127; - for ( ; i + simd_size - 1 < len; i += simd_size ) { - simd_type chunk; - chunk.copy_from( &data[i], simd::element_aligned ); - auto mask = chunk > ascii_limit; - if ( simd::any_of( mask ) ) - return false; - } -#endif +// #ifdef EE_STD_SIMD +// using simd_type = simd::native_simd; +// constexpr size_t simd_size = simd_type::size(); +// const simd_type ascii_limit = 127; +// for ( ; i + simd_size - 1 < len; i += simd_size ) { +// simd_type chunk; +// chunk.copy_from( &data[i], simd::element_aligned ); +// auto mask = chunk > ascii_limit; +// if ( simd::any_of( mask ) ) +// return false; +// } +// #endif for ( ; i < len; ++i ) if ( data[i] > 127 )