News for hackers. Stuff that matters.
Re:Benchmarking Codswallop: Node.js vs. PHP by CJefferson on Tuesday November 12, 2013 @09:39AM (#6718039)
It think the problem is you are feeding into the same loop. There are also probably ways of making the PHP script go faster still.

Also, that seems like a bit of a magic flag to add / tune, why is that not the default, and would I have to keep tuning it for each of my apps?

Re:Benchmarking Codswallop: Node.js vs. PHP by dspillett on Tuesday November 12, 2013 @02:54PM (#6720482)
The article starts the loop though. If tuning one setting is a black are that an inexperienced dev would miss (which it of course is, I don't disagree at all there), then drawing in a new library to work around the limits (in this circumstance) of file_get_contents() is very much so too.

Neither the original benchmark nor the response were well researched IMO. This is the Apache vs IIS wars again, where good benchmarks that reveal useful information were drowned out by the noise of a great any poorly executed (or sometimes completely biased and deliberately poorly constructed), with bad test resulting in a bad result for one side being followed by an equally bad test to try prove the opposite.

Re:Benchmarking Codswallop: Node.js vs. PHP by philstu on Thursday November 14, 2013 @01:08AM (#6730861)
Hold on, why was my response badly researched?

The point was that NodeJS and PHP were pretty close, and I posted (before the update) that I'm sure Node could go quicker.

You run either of them in suicide mode to RUN ALL THE CONNECTIONS and you'll get a speed up. The point is that NodeJS is not magically 4 or 5 times faster than PHP, they're about the same when you the packages you use support the async approach. This update proves they're exactly the same, but similarity is all I was going for.

Re:Benchmarking Codswallop: Node.js vs. PHP by k3n on Tuesday November 12, 2013 @11:14AM (#6718597)
This is already why the author did though; the original benchmark that he replied to used Cheerio vs. phpQuery, but he rationalized that that was a losing battle anyways, and decided to test Cheerio vs. ReactPHP -- which requires a non-standard PHP extension called libevent.
Re:Benchmarking Codswallop: Node.js vs. PHP by viraptor on Tuesday November 12, 2013 @12:18PM (#6719131)
It's not the phpQuery part that was replaced. It's the file_get_contents() call, which does the http get that he moved to the react framework.
Re:Benchmarking Codswallop: Node.js vs. PHP by k3n on Tuesday November 12, 2013 @12:36PM (#6719285)
So my point stands... he already deviated from what was originally tested in order to favor PHP.

Why would that be acceptable, but not a simple config change for NodeJS?