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

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

 



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


[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