A 21ic community benchmark shows how RISC-V vector extension hand-tuning can deliver a 5.3x speedup for a 512-point radix-2 FFT on the XuanTie C906.
The RISC-V Vector Extension differs from ARM Neon and SVE in one important way: the vector length is discovered at runtime through the vlenb CSR. The same binary can therefore run efficiently on hardware with different vector register widths, without recompilation. For embedded signal-processing applications, this is a significant portability advantage.
The FFT implementation is a classic radix-2 butterfly algorithm. The dominant costs are complex multiplications and twiddle-factor table lookups.
| Implementation | 512-point FFT time | Speedup |
|---|---|---|
| Scalar baseline | 12.8 us | 1.0x |
| Radix-4 unrolled | 8.1 us | 1.6x |
| RVV hand-vectorized | 2.4 us | 5.3x |
The 5.3x speedup comes primarily from using vector loads and fused multiply-add operations across the butterfly stages.
The author highlights four RVV-specific techniques that matter for FFT performance:
The post also lists four common mistakes when moving scalar FFT code to RVV:
The techniques above are written for a 64-bit RVV implementation, but the same principles apply to 32-bit cores such as the WCH QingKe V4 series when they include the vector extension. For developers working with CH32V003 or CH32V307, the scalar baseline is still the practical starting point; however, as V4F and future QingKe variants add RVV support, the same FFT optimization path will become relevant.
On the SpacemiT side, the K1 IME matrix extension and the K3 A100 AI cores offer alternative acceleration paths for larger FFT sizes, but RVV remains the most portable starting point for general signal-processing kernels.A 5.3x speedup on a 512-point FFT with hand-tuned RVV intrinsics demonstrates that the RISC-V vector extension is competitive for embedded DSP work. The main prerequisites are a compiler that supports RVV, a runtime check of vlenb, and careful attention to twiddle-table bounds and floating-point CSR state.
Source: RISC-V向量扩展(RVV)在FFT加速中的移植与性能实测