View Single Post
Old 02-05-2003, 08:35 PM   #2
Koryon
Member
 
Join Date: Apr 2002
Location: Canada
Posts: 50
Koryon is on a distinguished road
Send a message via ICQ to Koryon Send a message via MSN to Koryon
It boils down to a matter of preference... with select() you give three lists to select(), one for ready to read, one for ready to write, one for exceptions. With poll() you send one array, and you have to check each element for each possibility. Also.. with poll(), if you only want to use one system call per loop around, you are going to have to ensure that all your struct pollfds are in one spot in memory, so that could cause either more system calls with malloc/calloc/etc, or you simply rebuild this list each iteration. Either way I have trouble seeing this being noticeably faster than select(), unless said ircd was coded very poorly with select(), but I could be missing something.

The point would also be somewhat moot on an older machine (before 97 at least, older), since the kernel won't support a poll() call, the compiler will have to turn poll() into a select() anyway!
Koryon is offline   Reply With Quote