Fast constexpr integer powers (ipow)
A good optimizing compiler will transform tail-recursive functions to run as fast as imperative code. - SO
see also
- C++ Super Optimization: 1000X Faster - general overview of
constexpr
usage and optimisation- demo with recursive Fibonacci and prime number
Written on June 26, 2021, Last update on July 3, 2021
c++
math
recurse
optimize
fastware
Fibonacci