From: Ed Carp Date: April 29 1999 3:42pm Subject: Re: Need an opinion - C vs PHP List-Archive: http://lists.mysql.com/mysql/2633 Message-Id: <199904291542.KAA03432@wats-ts4-12.ppp.iadfw.net> Content-Type: text Attachment: [text]
> .. the difference is so minimal its not funny, but overall PHP has got to > win for web based stuff Not at all. It all depends on what you're looking for, and what your experience level is. If your site is going to get a lot of hits, C is the best tool, because it's the fastest. If you have limited programming experience, PHP or PERL will perhaps fit your needs better, because it's more of a RAD tool than C is, but you trade off speed and flexibility. But no interpreted language will be faster than compiled native code, that's just common sense. For example, I have a web page that uses MySQL to generate an index of news headlines and links. I wrote this in C, because it had to be fast - when you're searching a database of 24,000+ headlines, and have multiple people banging away at the server, it pays to make it as fast as possible, and the HTML was no harder to generate than it was in any other language. PHP or PERL would've been at least half as fast (I know because I benchmarked the same app written in C, PERL, and PHP). There's a saying in certain programming circles that people who don't know how to program choose PERL or PHP, people who do choose C or C++, and I think there's a certain amount of truth in that. Why is MySQL qritten in C, rather than in PERL? It would've certainly been easier. Why is most system software written in C? Why is it that most every modern operating system is written in C or C++? -- Ed Carp, N7EKG erc@stripped 940/367-2744 cell phone Owner: WeatherAlert/Digital Weatherman - NWS alerts via email/pager/Internet DSOUTH-L backup, Terrorism, Shamanism, Hurricane mailing lists http://www.pobox.com/~erc "i have my plans and brave ambitions, knowing no bounds, no inhibitions..." Basia Trzetrzelewska, "Third Time Lucky"