Skip to content

Compare Timings of Different Factorial Calculation Algorithms.

License

Notifications You must be signed in to change notification settings

alansam/CF.Factorial.Timings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CF.Factorial.Timings

Compare Timings of Different Factorial Calculation Algorithms.

Run timing loops over the following factorial calculator algorirhms to determine which is fastest.

  • Iterative.
  • Recursive.
  • Unrolled Loop.
  • Table Lookup.

Sample Run

CF.Factorial.Timings
C Version: 201710
Iterative:
  20!:  2432902008176640000, overflow: false
  CPU Time   =   0.445689 s
Recursive:
  20!:  2432902008176640000, overflow: false
  CPU Time   =   0.629249 s
Unrolled:
  20!:  2432902008176640000, overflow: false
  CPU Time   =   0.141881 s
Tabular:
  20!:  2432902008176640000, overflow: false
  CPU Time   =   0.017959 s
Program ended with exit code: 0

About

Compare Timings of Different Factorial Calculation Algorithms.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages