doubu1950 2010-07-14 17:17
浏览 47
已采纳

C ++与PCA上的PHP性能

May I know whether C++ or PHP is more efficient on running PCA (Principal Component Analysis)?

I'm developing a web based system which get uploaded image with php, and then process the image so that I can analyse the image with PCA to find out whether the image match with another image which already stored in database.

But I'm wondering which language to use (C++ or PHP or any other better alternative) for a better performance to complete the PCA task.

tq~

  • 写回答

1条回答 默认 最新

  • dongshuming7131 2010-07-15 19:17
    关注

    Generally speaking, in computationally intensive projects, code doing the same steps is 100 times faster in C (or C++ for that matter) compared to PHP. Optimizing your C will give another 2-10 times increase, depending on the time, effort and knowledge you put in.

    The point is that PHP is interpreted, and C runs, loosely speaking, almost directly on your cpu. If you really want to get the most out of it, in C you can go down the SSE1/2/3/4 road.

    You could of course use or write a library (or call it "extension") for PHP in C, which in my experience is a good match to achieve high speed at the right points while keeping the benefits of PHP.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大