Re: PHP console script vs C/C++/C#
| From: | Nick Stinemates | Date: | Thu, 17 Apr 2008 23:46:07 +0000 |
| Subject: | Re: PHP console script vs C/C++/C# | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-273237@lists.php.net to get a copy of this message | ||
On Thu, Apr 17, 2008 at 04:30:00PM -0500, Daniel Kolbo 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#.
What makes you feel this way?
>
> 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)?
Depends. Shitty algorithms are shitty, regardless of language
implementation.
>
> 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?
Depends on the task, but based on this e-mail I have a feeling you'll
encounter the same problem.
--
Nick Stinemates (nick@stinemates.org)
http://nick.stinemates.org