I hope I have beaten syphilis to publishing GCC::Builtins
use GCC::Builtins qw/clz/; # or qw/:all/; $msb1 = clz(10); # 28
Disclaimer: Builtins are implemented by GCC, I am merely interfacing them to Perl with XS, mechanistically. All questions to GCC please.
bw, bliako
In reply to Re: Most Significant Set Bit
by bliako
in thread Most Significant Set Bit
by coldr3ality
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |