> This is one of the reasons you use select(). It means you can scan a
> bit array very fast.
and the kernel scans a normal array really slow underneath. Somewhere
someone pays the costs in the select and poll models.
select() is O(n) where n is the max descriptor. poll() is O(m) where m is
the number of descriptors. Both are linear in their inputs ... m <= n...
poll is generally more efficient at the kernel level since select is
implemented in terms of poll. Even in the cases where the outputs are
sparse and find_first_zero_bit becomes a win, you still had to pay for
O(n) operations inside select(). So timing things at the user level only
is totally bogus.
Dean