HappenLee opened a new pull request, #70747: URL: https://github.com/apache/doris/pull/70747
### Background The BE counts positive filter bytes to determine how many rows pass a filter. URL domain functions also scan byte buffers to locate delimiters. Both operations already have SIMD implementations in Doris. ### What problem does this PR solve? Issue Number: None Related PR: None PR Type: Performance Problem Summary: Two architecture guards keep AArch64 builds from selecting the existing SIMD loops. Filter counting checks the x86 POPCNT feature macro on AArch64, and the compile-time URL delimiter search only enables its 16-byte scan under SSE2. This change enables both paths on AArch64 through the existing SIMD compatibility layer. ### Details - **Why it was slow:** AArch64 used the generic filter-count loop and processed URL delimiters one byte at a time at the source level. The compiler could already vectorize the generic filter count. - **Optimization:** Count positive bytes in 64-byte blocks and search for compile-time delimiters in 16-byte blocks. Forward and reverse searches use remaining lengths to decide when a vector load fits. The reverse scalar tail stops at the beginning of the input. - **Results:** Cross-architecture checks matched scalar reference results. Native AArch64 throughput has not been measured. - **Applicability and cost:** Applies to AArch64 filter counting and the compile-time URL searches used by domain functions. The runtime symbol-set dispatch and SQL result semantics are unchanged. No new dependency or configuration is required. ### Testing - Cross-compiled filter counting for Armv8-A with CRC and checked 2,840 cases in AArch64 emulation. Compared x86-64 generated assembly before and after under SSE2 without POPCNT, SSE4.2, and AVX2. Each pair was identical. - Added two URL search unit tests covering vector boundaries, forward and reverse matches and misses, and empty symbol sets. Both passed standalone on x86-64 with AddressSanitizer and UndefinedBehaviorSanitizer. URL searches also matched a scalar reference in 53,649 emulated AArch64 cases and 13,909 native x86-64 cases. - Formatting and BE build hygiene checks passed. The full local BE unit test build was blocked by missing third-party libraries. ### Release note None. ### Check List (For Author) - Behavior changed: No - Does this need documentation: No - Pre-submission status: Partially verified. Focused tests passed. Full BE CI and a native AArch64 performance measurement are outstanding. ### AI Disclosure - Tool: OpenAI Codex (GPT-6) - Generated: Implementation, focused tests, and PR description. - Human review: The contributor discussed and approved the implementation approach. Code review is requested on this PR. -- 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]
