Re: [PHP] What is faster?

2005-06-06 Thread Mark Cain
learn more? Mark Cain - Original Message - From: Chris Shiflett [EMAIL PROTECTED] To: Mark Cain [EMAIL PROTECTED] Cc: Andy Pieters [EMAIL PROTECTED]; php-general@lists.php.net Sent: Sunday, June 05, 2005 9:56 PM Subject: Re: [PHP] What is faster? Mark Cain wrote: I checked the first

Re: [PHP] What is faster?

2005-06-06 Thread Jochem Maas
@lists.php.net Sent: Sunday, June 05, 2005 9:56 PM Subject: Re: [PHP] What is faster? Mark Cain wrote: I checked the first expression with 1,000 iterations and it took 0.00745 seconds. Here is the code I used. [snip] $start1 = vsprintf('%d.%06d', gettimeofday()); Although many would argue

Re: [PHP] What is faster?

2005-06-06 Thread Marek Kilimajer
Mark Cain wrote: I see your point about including the timing code in the calculation itself and while it does add time to the process, he is not just timing this code -- he is timing this code against another. Meaning we don't want to know How fast is this code? per se -- we want to know Which

[PHP] What is faster?

2005-06-05 Thread Andy Pieters
Hi all Of these two expressions, which one is faster? if(!(is_null($customMenu)) (is_array($customMenu))) $menu=$customMenu; else $menu=array('Documentation','Settings'); OR $menu=(!(is_null($customMenu)) (is_array($customMenu))?$customMenu:$menu); Anybody have any documentation on

Re: [PHP] What is faster?

2005-06-05 Thread Mark Cain
Time: . $end1 . P . $lapse1; ? Mark Cain - Original Message - From: Andy Pieters [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Sunday, June 05, 2005 12:24 PM Subject: [PHP] What is faster? Hi all Of these two expressions, which one is faster? if(!(is_null($customMenu

Re: [PHP] What is faster?

2005-06-05 Thread Robert Cummings
On Sun, 2005-06-05 at 12:24, Andy Pieters wrote: Hi all Of these two expressions, which one is faster? if(!(is_null($customMenu)) (is_array($customMenu))) $menu=$customMenu; else $menu=array('Documentation','Settings'); OR $menu=(!(is_null($customMenu))

Re: [PHP] What is faster?

2005-06-05 Thread Chris Shiflett
Mark Cain wrote: I checked the first expression with 1,000 iterations and it took 0.00745 seconds. Here is the code I used. [snip] $start1 = vsprintf('%d.%06d', gettimeofday()); Although many would argue that it's pointless to worry over such small details (and they have valid