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: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
- Re: [PHP-CVS] cvs: php4 /ext/sockets sockets.c Andrei Zmievski
- RE: [PHP-CVS] cvs: php4 /ext/sockets sockets.c Colin Viebrock
- Re: [PHP-CVS] cvs: php4 /ext/sockets sockets.... Andrei Zmievski
- RE: [PHP-CVS] cvs: php4 /ext/sockets sock... Colin Viebrock
- Re: [PHP-CVS] cvs: php4 /ext/sockets... Andrei Zmievski
- RE: [PHP-CVS] cvs: php4 /ext/soc... Colin Viebrock
- Re: [PHP-CVS] cvs: php4 /ext/soc... Andrei Zmievski
- RE: [PHP-CVS] cvs: php4 /ext/soc... Colin Viebrock
- RE: [PHP-CVS] cvs: php4 /ext/soc... Derick Rethans
- Re: [PHP-CVS] cvs: php4 /ext/sockets sockets.... Boian Bonev
- [PHP-CVS] cvs: php4 /ext/sockets sockets.... Andi Gutmans
- [PHP-CVS] cvs: php4 /ext/sockets sockets.c Andrei Zmievski
- [PHP-CVS] cvs: php4 /ext/sockets sockets.c Jani Taskinen
- [PHP-CVS] cvs: php4 /ext/sockets sockets.c Jason Greene
- Re: [PHP-CVS] cvs: php4 /ext/sockets sockets.c Jason Greene
- RE: [PHP-CVS] cvs: php4 /ext/sockets sockets.c James Moore
- [PHP-CVS] changes Boian Bonev
- Re: [PHP-CVS] cvs: php4 /ext/sockets sockets.c Jani Taskinen
- Re: [PHP-CVS] cvs: php4 /ext/sockets sockets.... Jason Greene
- Re: [PHP-CVS] cvs: php4 /ext/sockets sock... Derick Rethans
- Re: [PHP-CVS] cvs: php4 /ext/sockets... Jason Greene