Felix-Gong opened a new pull request, #3396:
URL: https://github.com/apache/brpc/pull/3396

   ## What this PR does
   
   Adds RVV-accelerated  for byte search in  on RISC-V.
   
   ## Implementation
   
   -  in : uses RVV vector compare () +  to scan for target byte across buffer
   - Declaration in  with  for shared library builds
   - RVV dispatch in  — routes to  when RVV available, falls back to generic  
otherwise
   
   ## Performance (RISC-V SG2044, 50000 iterations)
   
   | Size | glibc memchr | RVV memchr | Speedup |
   |------|-------------|------------|---------|
   | 64B | 229 ns | 39 ns | **5.8x** |
   | 256B | 963 ns | 175 ns | **5.5x** |
   | 1KB | 3,317 ns | 753 ns | **4.4x** |
   | 4KB | 13,764 ns | 3,522 ns | **3.9x** |
   | 16KB | 52,970 ns | 13,155 ns | **4.0x** |
   | 64KB | 207,870 ns | 52,168 ns | **4.0x** |
   | 256KB | 723,560 ns | 251,868 ns | **2.9x** |
   | 1MB | 2,877,680 ns | 986,480 ns | **2.9x** |
   
   ## Dependency
   
   Depends on #3390 (RVV memcmp for StringPiece) being merged first, as this 
branch is based on top of it.
   
   ## Tests
   
   - : 724/725 passed (1 pre-existing StackTraceTest.find_symbol failure)
   - : 64/64 passed
   - Custom memchr correctness tests: 42/42 passed
   - Custom memchr performance benchmarks: all sizes tested


-- 
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