|
Posted by Tim Roberts on 06/29/07 05:24
Jerry Stuckle <jstucklex@attglobal.net> wrote:
>
>Paul.Lee.1971 wrote:
>>
>> 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?
>
>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.
>...
>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.
Exactly right. I'd also like to point out that writing a CGI handler in C
or C++ is a pain, as is doing MySQL work. There is a huge benefit in doing
"phase 1" in PHP, getting something working relatively quickly, and then
deciding whether or not it is "fast enough".
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
[Back to original message]
|