This is an automated email from the ASF dual-hosted git repository.
zhangstar333 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new b2c87f4f4d3 [opt](arm)Remove negative optimizations of SSE2NEON on
memcmp for ARM (#38759)
b2c87f4f4d3 is described below
commit b2c87f4f4d3ec2196db2e4957c0770effbd00d2b
Author: Mryange <[email protected]>
AuthorDate: Mon Aug 19 15:41:37 2024 +0800
[opt](arm)Remove negative optimizations of SSE2NEON on memcmp for ARM
(#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
```
---
be/src/vec/common/memcmp_small.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/be/src/vec/common/memcmp_small.h b/be/src/vec/common/memcmp_small.h
index 90a2ad183dc..194e8deedba 100644
--- a/be/src/vec/common/memcmp_small.h
+++ b/be/src/vec/common/memcmp_small.h
@@ -38,7 +38,7 @@ int cmp(T a, T b) {
/// Results don't depend on the values inside uninitialized memory but Memory
Sanitizer cannot see it.
/// Disable optimized functions if compile with Memory Sanitizer.
-#if (defined(__SSE2__) || defined(__aarch64__)) && !defined(MEMORY_SANITIZER)
+#if (defined(__SSE2__) && !defined(__aarch64__)) && !defined(MEMORY_SANITIZER)
#include "util/sse_util.hpp"
/** All functions works under the following assumptions:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]