What's the quickest way to compute log2 of an integer in C#?
How can I most efficiently count the number of bits required by an integer (log base 2) in C#? For example:
int bits = 1 + log2(100);
=> bits == 7