Linked by David Adams on Wed 14th Dec 2011 16:01 UTC, submitted by fran
Thread beginning with comment 500252
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.
Features
Linked by Thom Holwerda on 06/13/13 14:35 UTC
Linked by Thom Holwerda on 06/11/13 17:07 UTC
Linked by Thom Holwerda on 06/10/13 23:13 UTC
Linked by Thom Holwerda on 06/08/13 14:57 UTC
Linked by Thom Holwerda on 06/07/13 11:40 UTC
Linked by Thom Holwerda on 06/04/13 12:45 UTC
Linked by nfeske on 05/31/13 10:12 UTC
Linked by Thom Holwerda on 05/29/13 16:59 UTC
Linked by Thom Holwerda on 05/24/13 17:26 UTC
Linked by Thom Holwerda on 05/21/13 21:38 UTC
More Features »
Sponsored Links



Member since:
2005-07-06
"Image generation typically uses a linked module compiled into PHP, written in C or C++, so there's no slow down there."
Correct me if I'm wrong, but this is what I'm hearing:
A) C/C++ should be used for CPU intensive tasks because PHP performs poorly on intensive tasks.
B) There's no reason to make PHP efficient because CPU intensive tasks can be done in more efficient languages.
The reasoning is too circular for my taste.
I think you're looking a little too hard for some circular reasoning. A far more reasonable (and obvious) takeaway might be:
1: C/C++ is used in PHP where it makes sense to have something fast.
2: There's no reason to do everything in C/C++, because much of what PHP does is fairly basic. For the CPU-intensive operations, use compiled code, somewhat the same way hardware uses ASICs and GPUs for specific operations (such as crypto).
The other issue I already alluded to is that not everyone has access to a web server where they can load their own apache/PHP modules because they're running in a shared environment where everyone has to make due with the same stock settings.
That's true, but by the time you get to where that becomes important, you've got a hosting plan that includes more than a stock environment (VPS, Amazon, etc.)