Skip to content

A blazing fast, branchless header only trigonometric library

Notifications You must be signed in to change notification settings

junaire/fast_tri

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fast_tri

A blazing fast, branchless trigonometric library, it's header only

Installation

To use fast_tri in your project, simply copy the fast_tri.h file into your project's directory and include it as follows:

#include "fast_tri.h"

Usage

This library only contains two functions:

  • double fast_sin(double)
  • double fast_cos(double)

Warning

The functions above can only handle inputs between 0 - 2pi !!!

Benchmark

Performance Benchmark:
  std::sin: 0.000339228 seconds
  fast_sin: 0.000154573 seconds
Speedup:
sin: 2.19461x

  std::cos: 0.000327002 seconds
  fast_cos: 0.000151847 seconds
Speedup:
cos: 2.1535x

About

A blazing fast, branchless header only trigonometric library

Topics

Resources

Stars

Watchers

Forks

Languages