This highly optimised function was introduced about one year ago for handling of denomals with rational values (fractions), as an interim solution until we'll switch to C++20. Since this function uses an unrolled loop and basically just does a logarithmic search for the highest set bit, it can just be declared constexpr. Moreover, it is now relocated into one of the basic utility headers Remark: the primary "competitor" is the ilogb(double), which can exploit hardware acceleration. For 64bit integers, the ilog2() is only marginally faster according to my own repeated invocation benchmarks. |
||
|---|---|---|
| .. | ||
| common | ||
| include | ||
| lib | ||
| lumiera | ||
| plugin | ||
| stage | ||
| steam | ||
| tool | ||
| vault | ||
| .gitignore | ||
| DIR_INFO | ||
| doxygen.dox | ||
| SConscript | ||