Re: [PHP] Which is quicker, if-else statements

2003-03-19 Thread Ernest E Vogelsinger
At 04:38 19.03.2003, -{ Rene Brehmer }- said: [snip] >I'm totally lost here ... what does that mean??? > >Reminds me of assembler, except that assembler is more like: >0001 jnp e002 e003 0005 >0002 jmp e002 e003 0008 > >And so on (not sure if that's fully cor

RE: [PHP] Which is quicker, if-else statements

2003-03-18 Thread daniel
h >over 25 classes). Turck comes with a nice web interface where you can >disable the cache or optimizer and also view the cached scripts. > >Jason > >On Tue, 2003-03-18 at 20:38, -{ Rene Brehmer }- wrote: >> On Wed, 19 Mar 2003 00:39:11 +0100, Ernest E Vogelsinger wrote about

Re: [PHP] Which is quicker, if-else statements

2003-03-18 Thread Jason Sheets
100, Ernest E Vogelsinger wrote about "Re: > [PHP] Which is quicker, if-else statements" what the universal translator > turned into this: > > >Noticeable? Probably not, except you're timing loops of a million or more > >cycles... but it's clear that the s

Re: [PHP] Which is quicker, if-else statements

2003-03-18 Thread -{ Rene Brehmer }-
On Wed, 19 Mar 2003 00:39:11 +0100, Ernest E Vogelsinger wrote about "Re: [PHP] Which is quicker, if-else statements" what the universal translator turned into this: >Noticeable? Probably not, except you're timing loops of a million or more >cycles... but it's clear th

Re: [PHP] Which is quicker, if-else statements

2003-03-18 Thread Ernest E Vogelsinger
At 21:02 18.03.2003, Liam Gibbs said: [snip] >Is it just as quick to do: > >if($r == 0) { >} else if($r != 0) { >} > >than to do: > >if($r == 0) { >} else { >} > >The reason I like the former method is because, in a large IF-ELSE block, >it's clear what belo

Re: [PHP] Which is quicker, if-else statements

2003-03-18 Thread Robert Cummings
Kevin Stone wrote: > > Logically the if-else construct is faster becuase PHP doesn't have to parse > and execute the second conditional. An if-elseif construct is ussually > followed by an else block to describe a default action if no other > conditions are true. Otherwise you may as well use se

Re: [PHP] Which is quicker, if-else statements

2003-03-18 Thread Chris Shiflett
--- Liam Gibbs <[EMAIL PROTECTED]> wrote: > Is it just as quick to do: > > if($r == 0) { > } else if($r != 0) { > } > > than to do: > > if($r == 0) { > } else { > } No. It is (almost) the difference between two conditionals versus one. Both are fast, however, and you will find it hard to measur

Re: [PHP] Which is quicker, if-else statements

2003-03-18 Thread Kevin Stone
ments becuase it's exactly the same thing. - Kevin - Original Message - From: "Liam Gibbs" <[EMAIL PROTECTED]> To: "php list" <[EMAIL PROTECTED]> Sent: Tuesday, March 18, 2003 1:02 PM Subject: [PHP] Which is quicker, if-else statements Is it just as qui

[PHP] Which is quicker, if-else statements

2003-03-18 Thread Liam Gibbs
Is it just as quick to do: if($r == 0) { } else if($r != 0) { } than to do: if($r == 0) { } else { } The reason I like the former method is because, in a large IF-ELSE block, it's clear what belongs to what IF and what's going on. But does this make it lag? And, if so, is it really all that n