Re: [PHP] PHP console script vs C/C++/C#
- Date: Fri, 18 Apr 2008 10:25:05 -0700
- From: Nick Stinemates <nick@xxxxxxxxxxxxxx>
- Subject: Re: [PHP] PHP console script vs C/C++/C#
On Fri, Apr 18, 2008 at 09:58:14AM -0600, Nathan Nobbe wrote:
> On Thu, Apr 17, 2008 at 5:46 PM, Nick Stinemates <nick@xxxxxxxxxxxxxx>
> wrote:
>
> > > 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.
> >
>
>
> right, but there shitiness is relative to the performance of the underlying
> language. according to the great computer language shootout, if OP
> implemented in C / C++ he could expect something along the lines an increase
> in performace ~ 23x greater than the current php implementation. obviously
> there are many factors here; and well i dont think weve even found out what
> the script is doing :O. if its having to deal w/ lots of external calls for
> example to a database or remote system, those will still be major
> bottlenecks. but as far as processing the data and running though logic,
> yes there is much performance to be had by compiling.
>
> -nathan
I don't think there was a single place where I said PHP was faster than
C, nor did I imply it.
The point I was making is simple, if you have a shitty algorithm (which
is the case for our op) expect shitty performance.
There's no doubt you will gain performance moving to C, but, if properly
designed, you have a performance that is acceptable, then why go to that
level?
--
Nick Stinemates (nick@xxxxxxxxxxxxxx)
http://nick.stinemates.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php