Many thanks for the feedback. __ Raymond
On Sun, Aug 19, 2012 at 10:02 AM, Rasmus Lerdorf <ras...@lerdorf.com> wrote: > On 08/19/2012 10:29 AM, Raymond Irving wrote: > > Hello, > > > > What could have cause PHP to start out so great but then slows to a > crawl? > > Could it be the GC? > > > > Number of iterations Node.js PHP > > --------------------------------------------------------------- > > 100 2.00 0.14 > > 10’000 3.00 10.53 > > 1’000’000 15.00 1119.24 > > 10’000’000 143.00 10621.46 > > 1’000’000’000 11118.00 1036272.19 > > > > See the script here: > > > http://net.tutsplus.com/tutorials/javascript-ajax/node-js-for-beginners/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+nettuts+%28Nettuts%2B%29 > > > > Is there any way that this can be improved? > > If you are doing something that needs to iterate a billion times, you > shouldn't be using PHP. Things like calculating a fractal is just not > what PHP was meant for. The vast majority of Web apps have absolutely no > need to iterate that many times. You wouldn't try to show a user a > billion database records on a single page, for example. Chances are > pretty good that you are going to iterate less than 1000 times on a > typical request and if you do end up having to iterate more for some > reason, you would probably cache the result somewhere so you don't have > to do it on a subsequent request. > > -Rasmus >