HappenLee commented on a change in pull request #8214:
URL: https://github.com/apache/incubator-doris/pull/8214#discussion_r813511580



##########
File path: be/src/runtime/string_value.hpp
##########
@@ -67,6 +67,32 @@ static inline int string_compare(const char* s1, int64_t n1, 
const char* s2, int
     return n1 - n2;
 }
 
+// This is a special compare algorithm for len(s1) == len(s2) scenarios
+// faster than generic string_compare algorithm.
+// This code assumes that the trivial cases are already handled (i.e. len(s1) 
!= len(s2)).
+// Returns:
+//   true  if s1 == s2
+//   false if s1 != s2
+static inline bool eq_string_compare(const char* s1, const char* s2, int64_t 
len) {
+#ifdef __SSE4_2__

Review comment:
       the code seem simple, maybe you should try use `auto vectorized` with 
compiler. which can use avx2 or other simd code




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to