Re: cvs: php4 /ext/sockets sockets.c

From: Date: Sat, 03 Feb 2001 15:51:19 +0000
Subject: Re: cvs: php4 /ext/sockets sockets.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-3890@lists.php.net to get a copy of this message
By the way, often compilers change switch() to if()/else() if they know that it would be faster (if you only have like 2 cases) so if the code is much nicer you don't need to be too afraid of switch() :) Andi At 03:44 PM 2/3/2001 +0200, Boian Bonev wrote:
hi,
What do you mean, switch() is expensive?
Well, isn't it slower? perhapse in php switch is slower. in c it sometimes is much faster than bunch of if statements. i mean the compiler makes jump tables for consequitive values and there are less comparisons etc. just a range check and jump. b. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net For additional commands, e-mail: php-cvs-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.cvs (#3890) next »