Table of Contents
Fetching ...

A Novel SIMD-Optimized Implementation for Fast and Memory-Efficient Trigonometric Computation

Nikhil Dev Goyal, Parth Arora

TL;DR

This work tackles the problem of fast, memory-efficient trig function computation on hardware-constrained platforms. It introduces SIMD-accelerated, piecewise rational approximations for $\sin$, $\cos$, and $\tan$ derived from linear interpolation on uniform subranges of $\frac{\pi}{12}$, with tan built from these components to improve stability near singularities. The approach achieves roughly $5\times$ speedups over inbuilt C++ functions while requiring no precomputation, and demonstrates significantly reduced hardware resources on an Artix-7 FPGA in terms of BRAM and DSP usage, with especially strong stability for the tan function near $\pi/2$. The paper also details a SIMD-enabled C++ implementation using fast inverse square roots and angle-reduction techniques, and compares against optimized Taylor-series alternatives, showing favorable accuracy and performance trade-offs for resource-constrained deployments. Overall, the proposed methods offer practical, hardware-friendly trig computation suitable for FPGA, MCU, and similar platforms, with code and hardware notes provided for reproducibility.

Abstract

This paper proposes a novel set of trigonometric implementations which are 5x faster than the inbuilt C++ functions. The proposed implementation is also highly memory efficient requiring no precomputations of any kind. Benchmark comparisons are done versus inbuilt functions and an optimized taylor implementation. Further, device usage estimates are also obtained, showing significant hardware usage reduction compared to inbuilt functions. This improvement could be particularly useful for low-end FPGAs or other resource-constrained devices.

A Novel SIMD-Optimized Implementation for Fast and Memory-Efficient Trigonometric Computation

TL;DR

This work tackles the problem of fast, memory-efficient trig function computation on hardware-constrained platforms. It introduces SIMD-accelerated, piecewise rational approximations for , , and derived from linear interpolation on uniform subranges of , with tan built from these components to improve stability near singularities. The approach achieves roughly speedups over inbuilt C++ functions while requiring no precomputation, and demonstrates significantly reduced hardware resources on an Artix-7 FPGA in terms of BRAM and DSP usage, with especially strong stability for the tan function near . The paper also details a SIMD-enabled C++ implementation using fast inverse square roots and angle-reduction techniques, and compares against optimized Taylor-series alternatives, showing favorable accuracy and performance trade-offs for resource-constrained deployments. Overall, the proposed methods offer practical, hardware-friendly trig computation suitable for FPGA, MCU, and similar platforms, with code and hardware notes provided for reproducibility.

Abstract

This paper proposes a novel set of trigonometric implementations which are 5x faster than the inbuilt C++ functions. The proposed implementation is also highly memory efficient requiring no precomputations of any kind. Benchmark comparisons are done versus inbuilt functions and an optimized taylor implementation. Further, device usage estimates are also obtained, showing significant hardware usage reduction compared to inbuilt functions. This improvement could be particularly useful for low-end FPGAs or other resource-constrained devices.

Paper Structure

This paper contains 18 sections, 36 equations, 6 figures, 7 tables, 7 algorithms.

Figures (6)

  • Figure 1: Angle-wise Distribution of Speed-up Ratios for sin
  • Figure 2: Angle-wise Distribution of Relative error for sin
  • Figure 3: Angle-wise Distribution of Speed-up Ratios for cos
  • Figure 4: Angle-wise Distribution of Relative error for cos
  • Figure 5: Angle-wise Distribution of Speed-up Ratios for tan
  • ...and 1 more figures