Reply to Re: php speed compared to C++ cgi

Your name:

Reply:


Posted by Jerry Stuckle on 06/28/07 22:26

Paul.Lee.1971 wrote:
> Hi,
> I'm designing an application that will allow users to interrogate a
> Mysql database, using some form of regex. The database will be fairly
> big, and I'm wondering whether using pre-compiled C++ cgi or php will
> be faster?
>
> TIA
>
> Paul
> --
> http://www.paullee.com
>

It doesn't depend on the database query - it depends on what you're
doing other than the query.

Generally, C/C++ is faster in doing the same work, because it is
compiled. PHP has to be interpreted.

However, if you're running C/C++ as a CGI, you'll have overhead of
loading the CGI. Of course, if PHP is running as a CGI, the same will
be true. But if it's running as an Apache extension you'll have less
overhead. But this loading time is very small, and can generally be
ignored.

The bottom line here is - have you ever heard of "premature
optimization"? That's what you've got here. You're trying to optimize
something when you don't know you have a problem.

I really doubt it will be a problem either way, unless you're doing some
really heavy CPU work outside of your database query.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация