The only case I would recommend to use C is to write server API extensions
to the web server but for any other case, I don't believe the language
matters
as much as the implementation. E.g. CGI's written in ANY language will in
most cases be much slower than, for instance mod_perl or mod_php.
Look at http://perl.apache.org/bench.txt for benchmark info for Apache.
-----Original Message-----
From: Ed Carp [SMTP:erc@stripped]
Sent: Thursday, April 29, 1999 10:42 AM
To: farrm@stripped
Cc: mysql@stripped
Subject: Re: Need an opinion - C vs PHP
> .. 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"
---------------------------------------------------------------------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html"
before
posting. To request this thread, e-mail
mysql-thread2633@stripped
To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail mysql-unsubscribe@stripped instead.