miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Master Class miniBB Support Forums / Master Class /  
 

Switch instead of ElseIf ?..

 
Author OZtwo
Partaker
#1 | Posted: 20 Feb 2003 21:32 
What is it with your over use of ElseIf and not Switch anyway??? :)

Author Team
8-)
#2 | Posted: 21 Feb 2003 10:29 
Because elseif is MUCH FASTER than Switch.

Author OZtwo
Partaker
#3 | Posted: 21 Feb 2003 11:04 
Any really good sites to readup on php performance? I would have guessed switch with the use of break would be faster. But with me being so new to php of course I'm wrong. :) But I have to say, I do love this application and the way you did program it. Very well done!!

Author 4days
Champi0n
#4 | Posted: 21 Feb 2003 14:37 
checking out all the user posts in the english documentation on php.net is good - pretty much every function has a post from someone saying what it's faster or slower than.

phpbuilder.com has some decent articles too.

Author terex
Partaker
#5 | Posted: 16 Mar 2004 02:34 
Ofcause Php is not compier, but switch{} is more quickly in any case, isn't it?
--
sorry for my russian english

Author Team
8-)
#6 | Posted: 16 Mar 2004 10:19 
Exactly vice versa - it is much slower.

Author terex
Partaker
#7 | Posted: 16 Mar 2004 22:39 
Hm. It's very interesting why. So interesting that i'll go see source code of php.

Author Team
8-)
#8 | Posted: 17 Mar 2004 10:48 
Example.

www.php.net/switch

Ctrl+F and search for the word "slower"

This is just one example... I have lost a complicated test which proofs that.

I guess, in case of miniBB with very simple comparisions the speed difference between "switch" and "if" is not really critical. We are using "if" just because it is more suitable.

Author terex
Partaker
#9 | Posted: 17 Mar 2004 13:33 
Ok, thanks 8)

Master Class miniBB Support Forums / Master Class /
 Switch instead of ElseIf ?..
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑