Skip to content

this repo aims to test the performance and accuracy different elementary functions (e.g. log, sin, cos..)

License

Notifications You must be signed in to change notification settings

DiamonDinoia/benchmark-elementary-functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

benchmark-elementary-functions

This repository aims to test the performance and accuracy of different elementary functions (e.g. log, sin, cos...).

Logarithm Results

Function Time (us) Average Error Max Error
STD DOUBLE 65.458 0 0
STD SINGLE 50.739 1.38617e-08 5.86492e-08
FAST LOGF 47.7693 1.43832e-08 7.55761e-08
APPROXIMATE LOGF 2.5359 5.74123e-06 1.49805e-05
FASTER LOGF 1.14601 0.0125169 0.0401875

Faster logf is 44 times faster than std::log but is also much less accurate.

SinCos Results

Function Time (ms)
STD SIN COS 34.9386
STD SINCOS 34.8707

It seems that gcc-11 optimizes two different calls to sin and cos to the fast function sincos that computes both at the same time.

About

this repo aims to test the performance and accuracy different elementary functions (e.g. log, sin, cos..)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published