Closed OIer1048576 closed 1 year ago
Thanks,
the reason why we didn't optimize ceil_pow2
is, the cost of this function willn't be any bottleneck in current usage. (In contrast, we call bsf
in the convolution function many times so we have to optimize this)
As already you discussed, __builtin_xxx
is a non-standard function of C++ and we want to avoid to use as much as possible.
__builtin_expect is wrong and cannot compile in either GCC or Clang.
Wrong:
Collect:
Also, as a fundamental issue,
__builtin_expect
is not supported by Visual Studio, so it is better not to use__builtin_expect
.