Use poll() instead of select()

Lubos Lunak kde-optimize@mail.kde.org
Thu, 30 Jan 2003 11:28:04 +0100


On Thursday 30 of January 2003 11:15, Jaime Torres wrote:
> Hello,
>
>   I have done a small test with the very recent kde 3.1 on a
> linux-i686-2.4.20.
>
>   I have readed in http://www.kegel.com/dkftpbench/Poller_bench.html
>   that poll() is faster than select() on Linux,*BSD and I thinked that also
> in comercial unixes, but I know that poll() is simpler to use than
> select().

 From the URL:
(for 100 fds)  
 call       microseconds
 select  54
 poll     50

>
>   I have only changed select by poll in the dcop server, resulting in a
> dcop library of 258 bytes less and less memory normaly implies less swap
> and better performance.

 Well, 258 bytes is not going to change that much with 10+MiB KDE libraries 
I'm afraid.

man poll:
...
CONFORMING TO
       XPG4-UNIX.

 Isn't that a little problem? I actually don't know what this XPG4 is, but 
unless it's some widely used standard, I don't think the benefits are worth 
it.

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak@suse.cz , l.lunak@kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/