4 ms·
man ffs
- jzwinck 12y agoToday I discovered ffs(3) is part of glibc. It's a family member of the GCC extensions __builtin_clz(), _ctz(), and _ffs(), for finding the first set bit in a word (dword, qword, multiple widths exist). See: http://en.wikipedia.org/wiki/Find_first_set http://en.wikipedia.org/wiki/Find_first_set These functions are useful because they can be mapped to a single instruction, BSF on x86.