Re: PHP console script vs C/C++/C#

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

 



On Thu, Apr 17, 2008 at 3:30 PM, Daniel Kolbo <kolb0057@xxxxxxx> wrote:

> Hello,
>
> I am writing a PHP script for a local application (not web/html based).
>  My script is taking a longer time to execute than I want.  The source code
> is a few thousand lines, so I will spare you all this level of detail.
>
> I prefer to write in PHP because that is what I know best.  However, I do
> not think there is anything inherent with my script that requires PHP over
> C/C++/C#.
>
> If I wrote the console application in a c language (and compiled) would
> one expect to see any improvements in performance?  If so, how much
> improvement could one expect (in general)?
>
> I assume because php is not compiled that this real time interpretation of
> the script by the zend engine must take some time.  This is why I am
> thinking about rewriting my whole script in a C language.  But before I
> begin that ordeal, i wanted to ask the community for their opinions.  If you
> think using a c language would suit me well, what language would you
> recommend?
>
> My google and mail archive searching for this yielded mainly PHP for web
> apps, so I am asking all of you.
>
> My main question is, how much of an improvement in performance will one
> see by using a compiled version of an application versus using a scripted
> version of an application?
>
> I looked at PHP's bcompiler, but the documentation is minimal so I am
> hesitant to dig much deeper into that, unless someone strongly suggests
> otherwise.


here you can c php is much slower than a compiled alternative:

http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all

-nathan

[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