Re: Timings for optimised poll(2)

James Mastros (root@jennifer-unix.dyn.ml.org)
Tue, 26 Aug 1997 23:30:34 -0400 (EDT)


On Tue, 26 Aug 1997, Richard Gooch wrote:
[...]
> Test 1: checking descriptors 24-1023:
> select: 2202 microseconds
> poll: 2680 microseconds
> poll2: 2140 microseconds
>
> Test 2: checking descriptors 924-1023:
> select: 513 microseconds
> poll: 278 microseconds
> poll2: 224 microseconds
>
> Test 3: checking descriptors 1014-1023:
> select: 323 microseconds
> poll: 60 microseconds
> poll2: 47 microseconds
[...]

You missed an important test: a random 25% of fds 4-1023 (the same random
set for all three, naturally). This (it would seem to me) is closest to
what real-life programs do. Also, I have the feeling that gcc will optmize
bitfeilds such that 101 is much slower than 011.

-=- James Mastros