Felix-Gong commented on PR #3375:
URL: https://github.com/apache/brpc/pull/3375#issuecomment-4905311636

   ## SG2044 (rv64gcv, VLEN=128) 基准测试结果
   
   在 SG2044 RISC-V 64 位系统上编译并运行(Clang 17, -O2 -march=rv64gcv):
   
   | 大小 | memcpy | cp_rvv (RVV e8m8) | 加速比 |
   |---|---|---|---|
   | 64 B | 2.85 GB/s | 19.20 GB/s | **6.7x** |
   | 128 B | 5.04 GB/s | 21.24 GB/s | **4.2x** |
   | 256 B | 7.81 GB/s | 19.30 GB/s | **2.5x** |
   | 512 B | 10.23 GB/s | 19.32 GB/s | **1.9x** |
   | 1024 B | 11.22 GB/s | 19.43 GB/s | **1.7x** |
   | 4 KB | 6.10 GB/s | 6.92 GB/s | 1.1x |
   | 16 KB+ | 3-4 GB/s | 3-4 GB/s | ~1x |
   
   ### 分析
   - **小尺寸(L1/L2 缓存友好,64-1024 B)**:RVV 利用 128 位向量加载/存储(LMUL=8 每次迭代处理 128 
字节),加速比 1.7x-6.7x。对于 IOBuf 操作——通常是小缓冲区复制——这是最佳优化场景。
   - **中等尺寸(L3 缓存,4-64 KB)**:两者性能大致持平,受 L3 缓存带宽限制。
   - **大尺寸(DRAM,>64 KB)**:两者均受内存带宽限制,性能持平。
   
   这些结果验证了 RVV cp() 是 IOBuf 数据路径的净正向优化。


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