I'm now building a recommender system(a web site). I want to use the PHP as the script language. The recommender system may do complex matrix computing or something else. Considering the performance,I want to use C++ to do matrix computing or other complex computing. So I need the PHP call C++ function, get the result and do other processing. I know I can use the PHP extension to call C++. My question is do I need to use C++ or just use PHP to do the complex computing? Is using c++ extension faster than pure PHP?
Asked
Active
Viewed 2,497 times
3
-
Using C++ for advanced computation is often faster. – Michael J.V. May 13 '11 at 13:45
-
Not sure why this was voted off topic??? – John Carter May 13 '11 at 13:47
1 Answers
6
Yes, using a C++ extension for complex calculations will give you a significant speedup over PHP.
Check out these questions for more details to go about doing this:

Community
- 1
- 1

John Carter
- 53,924
- 26
- 111
- 144