RES: Odd performance problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



My tests on PHP 4.4.8

Default files:

Run 1)
done at 100045

Time: 12.5804 Seconds

Run 2)
done at 100045

Time: 12.6775 Seconds

Run 3)
done at 100045

Time: 13.0696 Seconds

Now editing the file, removed the switch case 'a' part.

Run 1) 
done at 100045

Time: 12.6981 Seconds

Run 2)
done at 100045

Time: 12.8659 Seconds

Run 3)
done at 100045

Time: 12.7886 Seconds

As you can see, there's no really big difference here. It really does look
like it's slower, but .1 sec slower.


Hey Robert, this was just a semprom 3k... didn't know they were that dif



Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
thiago.pojda@xxxxxxxxxxxxxxxxxx
Excelência em Softwares Financeiros

-----Mensagem original-----
De: Robert Cummings [mailto:robert@xxxxxxxxxxxxx] 
Enviada em: sexta-feira, 9 de maio de 2008 04:44
Para: Joeri Sebrechts
Cc: php-general@xxxxxxxxxxxxx
Assunto: Re:  Odd performance problem

On Wed, 2008-05-07 at 17:31 +0200, Joeri Sebrechts wrote:
> Hello,
> 
> While debugging a script that ran too slowly I came across something that
I 
> can't explain.
> 
> It is inactive code that when removed doubles the run time of the script.
> 
> Specifically, the issue is a switch statement, where one of the cases is 
> never reached. If I remove the case from the code, the run time of the 
> script goes from 6 seconds to 12 seconds.
> 
> To see this problem in action, you can download the problematic script
here:
> http://sebrechts.net/files/2008/phpperfissue.zip
> 
> Anyone have any ideas on how this is even possible? I'd like to improve
the 
> run time of the script, but if every part of code that I take out makes it

> run longer ...

Runs the same for me either way... under PHP4 and PHP5. You must have a
nice system, takes 22 seconds both ways on my Athlon 2400 :)

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux