Skip to content

Commit 138103f

Browse files
authored
[opt](arm)Remove negative optimizations of SSE2NEON on memcmp for ARM… (#43510)
… (#38759) #38759 The main issue is that _mm_movemask_epi8 does not have a one-to-one corresponding instruction on ARM. Testing shows that it performs worse compared to using memcmp, which allows the compiler to generate the corresponding ARM instructions. The following tests were conducted on ARM. ``` -------------------------------------------------------------- Benchmark Time CPU Iterations -------------------------------------------------------------- BM_memequal16_sse 3.77 ns 3.77 ns 743238946 BM_memequal16_orgin 2.11 ns 2.11 ns 1000000000 ```
1 parent 91eb8f8 commit 138103f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

be/src/vec/common/memcmp_small.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ int cmp(T a, T b) {
3838
/// Results don't depend on the values inside uninitialized memory but Memory Sanitizer cannot see it.
3939
/// Disable optimized functions if compile with Memory Sanitizer.
4040

41-
#if (defined(__SSE2__) || defined(__aarch64__)) && !defined(MEMORY_SANITIZER)
41+
#if (defined(__SSE2__) && !defined(__aarch64__)) && !defined(MEMORY_SANITIZER)
4242
#include "util/sse_util.hpp"
4343

4444
/** All functions works under the following assumptions:

0 commit comments

Comments
 (0)