PHP using c++ extension will be faster?
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+开发者_如何学Python+. 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?
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:
- How can I use C++ code to interact with PHP?
- Extending PHP with C++?
精彩评论