Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
What is the fastest/most efficient way to find the highest set bit (msb) in an integer in C?
#include <iostream> #include <intrin.h> using namespace std; int main() { auto Index = 13UL; const auto Mask = 0UL; _BitScanReverse(&Index, Mask); cout << Index << endl; }
run
|
edit
|
history
|
help
0
div64 inline asm
Hangman
const_pointer_cast
assaa
boost::synchronize
123
Fibonacci stairs
karma legacy "variant" with attr_cast
Arrays
Structured Member Value Access Using Structure Member Pointer and Variadic Templates