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

2008-04-20 Thread Robert Cummings
On Sun, 2008-04-20 at 14:41 -0400, Nathan Nobbe wrote: > On Sun, Apr 20, 2008 at 2:34 PM, Robert Cummings <[EMAIL PROTECTED]> > wrote: > > > > > On Sun, 2008-04-20 at 14:17 -0400, Nathan Nobbe wrote: > > > On Sun, Apr 20, 2008 at 6:50 AM, Per Jessen <[EMAIL PROTECTED]> wrote: > > > > > > > Nathan

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

2008-04-20 Thread Nathan Nobbe
On Sun, Apr 20, 2008 at 2:34 PM, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Sun, 2008-04-20 at 14:17 -0400, Nathan Nobbe wrote: > > On Sun, Apr 20, 2008 at 6:50 AM, Per Jessen <[EMAIL PROTECTED]> wrote: > > > > > Nathan Nobbe wrote: > > > > > > > umm, so whats going on here is the implicit

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

2008-04-20 Thread Robert Cummings
On Sun, 2008-04-20 at 14:17 -0400, Nathan Nobbe wrote: > On Sun, Apr 20, 2008 at 6:50 AM, Per Jessen <[EMAIL PROTECTED]> wrote: > > > Nathan Nobbe wrote: > > > > > umm, so whats going on here is the implicit component of the statement > > > that incorporates relative or absolute performance. in

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

2008-04-20 Thread Nathan Nobbe
On Sun, Apr 20, 2008 at 6:50 AM, Per Jessen <[EMAIL PROTECTED]> wrote: > Nathan Nobbe wrote: > > > umm, so whats going on here is the implicit component of the statement > > that incorporates relative or absolute performance. in terms of > > relative performance the statement is accurate; in term

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

2008-04-20 Thread Per Jessen
Nathan Nobbe wrote: > umm, so whats going on here is the implicit component of the statement > that incorporates relative or absolute performance. in terms of > relative performance the statement is accurate; in terms of absolute > performance, its quite inaccurate. > Nathan, I think we're disa

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

2008-04-19 Thread Nathan Nobbe
On Sat, Apr 19, 2008 at 7:08 AM, Per Jessen <[EMAIL PROTECTED]> wrote: > Nathan Nobbe wrote: > > > On Fri, Apr 18, 2008 at 11:25 AM, Nick Stinemates > > <[EMAIL PROTECTED]> wrote: > > > >> I don't think there was a single place where I said PHP was faster > >> than C, nor did I imply it. > > > >>

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

2008-04-19 Thread Larry Garfield
On Saturday 19 April 2008, Per Jessen wrote: > Robert Cummings wrote: > > You are correct about asymptotic bounds on algorithms; however, > > languages can still have a constant multiplier affect on an algorithm. > > Absolutely. When it comes to "how long does it take to process 1000 > elements",

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

2008-04-19 Thread Per Jessen
Robert Cummings wrote: > You are correct about asymptotic bounds on algorithms; however, > languages can still have a constant multiplier affect on an algorithm. Absolutely. When it comes to "how long does it take to process 1000 elements", both language and hardware are critical factors. But t

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

2008-04-19 Thread Robert Cummings
On Sat, 2008-04-19 at 13:08 +0200, Per Jessen wrote: > Nathan Nobbe wrote: > > > On Fri, Apr 18, 2008 at 11:25 AM, Nick Stinemates > > <[EMAIL PROTECTED]> wrote: > > > >> I don't think there was a single place where I said PHP was faster > >> than C, nor did I imply it. > > > >> > Depends. Shit

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

2008-04-19 Thread Per Jessen
Nathan Nobbe wrote: > On Fri, Apr 18, 2008 at 11:25 AM, Nick Stinemates > <[EMAIL PROTECTED]> wrote: > >> I don't think there was a single place where I said PHP was faster >> than C, nor did I imply it. > >> > Depends. Shitty algorithms are shitty, regardless of language >> > implementation. >

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

2008-04-18 Thread Nathan Nobbe
On Fri, Apr 18, 2008 at 11:25 AM, Nick Stinemates <[EMAIL PROTECTED]> wrote: > I don't think there was a single place where I said PHP was faster than > C, nor did I imply it. > > > Depends. Shitty algorithms are shitty, regardless of language > > implementation. implies that the same algorithm

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

2008-04-18 Thread Per Jessen
Nick Stinemates wrote: > The point I was making is simple, if you have a shitty algorithm > (which is the case for our op) expect shitty performance. Agree completely, that's the case in a nutshell. > There's no doubt you will gain performance moving to C, but, if > properly designed, you have a

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

2008-04-18 Thread Nick Stinemates
On Fri, Apr 18, 2008 at 09:58:14AM -0600, Nathan Nobbe wrote: > On Thu, Apr 17, 2008 at 5:46 PM, Nick Stinemates <[EMAIL PROTECTED]> > 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 muc

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

2008-04-18 Thread Nick Stinemates
> > = C O D E ===S T AR T > //this function is essentially a search and remove function for a nested > array > >foreach ($arr as $key => $value) { >//count($arr) == 3 >foreach ($value as $key2 => $value2) { > //0<=count($value) <=1000 >fore

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

2008-04-18 Thread Nathan Nobbe
On Thu, Apr 17, 2008 at 5:46 PM, Nick Stinemates <[EMAIL PROTECTED]> 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 alg

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

2008-04-18 Thread Nick Stinemates
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.

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

2008-04-18 Thread Eric Butera
On Fri, Apr 18, 2008 at 11:36 AM, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > On Fri, Apr 18, 2008 at 9:33 AM, Eric Butera <[EMAIL PROTECTED]> wrote: > > > Like I said before, since you know that most of your time is in a > > specific part of your script, just move that function into a custom > > ext

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

2008-04-18 Thread Nathan Nobbe
On Fri, Apr 18, 2008 at 9:33 AM, Eric Butera <[EMAIL PROTECTED]> wrote: > Like I said before, since you know that most of your time is in a > specific part of your script, just move that function into a custom > extension written in c/c++. > > http://talks.php.net/show/extending-php-apachecon2003/

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

2008-04-18 Thread Eric Butera
On Fri, Apr 18, 2008 at 10:53 AM, Daniel Kolbo <[EMAIL PROTECTED]> wrote: > > > > Struan Donald wrote: > > > * at 17/04 16:30 -0500 Daniel Kolbo said: > > > > > > > Hello, > > > > > > I am writing a PHP script for a local application (not web/html > > > based). My script is taking a longer time to

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

2008-04-18 Thread Daniel Kolbo
Struan Donald wrote: * at 17/04 16:30 -0500 Daniel Kolbo said: 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

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

2008-04-18 Thread Per Jessen
Daniel Kolbo 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)? You haven't given us much to work with, so it's a wild guess, but I think you'd probably

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

2008-04-18 Thread Struan Donald
* at 17/04 16:30 -0500 Daniel Kolbo said: > 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 wri

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

2008-04-17 Thread Eric Butera
On Thu, Apr 17, 2008 at 5:30 PM, Daniel Kolbo <[EMAIL PROTECTED]> 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

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

2008-04-17 Thread Nathan Nobbe
On Thu, Apr 17, 2008 at 3:30 PM, Daniel Kolbo <[EMAIL PROTECTED]> 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