Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > MUD Coding
Click here to Register

Reply
 
Thread Tools
Old 02-02-2003, 04:10 PM   #1
halkeye
New Member
 
Join Date: Jan 2003
Name: Gavin
Location: Vancouver, Canada
Posts: 12
halkeye is on a distinguished road
Send a message via ICQ to halkeye Send a message via AIM to halkeye Send a message via MSN to halkeye
I was talking to one of my irc mates who happends to be one of the major coders for the dalnet irc server(s) and he was talking about them recently switching from select() to poll().

I don't understand much about it, bue he says its is alot faster. Unfortuatly, since i don't truely understand it, and have yet to really find any examples on how to use it (other than a simple one he showed me).

I was wondering if its worth looking into more? or for a mud with 20 or so people on at once max (i'm being hopeful as its a brand new mud that hasn't even started yet) is it even worth it? does the speed different matter then?
halkeye is offline   Reply With Quote
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
Reply


Thread Tools


poll() vs select() - Similar Threads
Thread Thread Starter Forum Replies Last Post
game_loop(), select(), and dual core CPUs Samson MUD Coding 3 02-17-2007 11:11 PM
Mythology Poll Burr Tavern of the Blue Hand 10 10-30-2002 07:02 PM
$ Info, le Poll TG_Nek Bugs and Suggestions 80 10-20-2002 06:35 PM
Poll Feyona Tavern of the Blue Hand 18 09-14-2002 07:29 PM
Not a Poll Feyona Introduce Yourself 2 06-20-2002 05:07 PM

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 10:31 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2022