https://github.com/junaire/fast_tri
A blazing fast, branchless header only trigonometric library
https://github.com/junaire/fast_tri
branchless header-only-library high-performance trigonometry-library
Last synced: 3 months ago
JSON representation
A blazing fast, branchless header only trigonometric library
- Host: GitHub
- URL: https://github.com/junaire/fast_tri
- Owner: junaire
- Created: 2024-12-22T05:40:06.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-12-22T05:44:09.000Z (5 months ago)
- Last Synced: 2025-01-03T04:41:05.013Z (5 months ago)
- Topics: branchless, header-only-library, high-performance, trigonometry-library
- Language: C
- Homepage:
- Size: 605 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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:
```cpp
#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.19461xstd::cos: 0.000327002 seconds
fast_cos: 0.000151847 seconds
Speedup:
cos: 2.1535x
```