zclllyybb commented on code in PR #18580: URL: https://github.com/apache/doris/pull/18580#discussion_r1167540940
########## be/src/util/simd/vstring_function.h: ########## @@ -122,6 +122,101 @@ class VStringFunctions { return rtrim(ltrim(str)); } + static StringRef rtrim(const StringRef& str, const StringRef& rhs) { + if (str.size == 0 || rhs.size == 0) { + return str; + } + if (rhs.size == 1) { Review Comment: not required for this pr but may be considerable: for most situations these function to be used, the needles are likely to be constant. So we can also use SIMD bitwise compare to optimize them. just give code below a little change will make it. -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org