View Single Post
Old 06-11-2004, 02:55 PM  
Nathan
Confirmed User
 
Industry Role:
Join Date: Jul 2003
Posts: 3,108
Quote:
Originally posted by AnalProbe
I read a LOT of crap here.

At first you are mistaken C with C++, which is a HUGE difference in performance as well as program design.

C is the fastest thing there is, you can easily use it to create webapps using the cgi library.

C++ is an OO language that's a tat slower, more like JAVA.


About C (not C++) versus PHP :

PHP is SLOW when you use it as an Apache module, average as a standalone app, and reasonable to good with Zend accelerator (cache).

It's very easy to learn, mature, but still, every time you start a thread (user request) you have the 8 megs of memory use for every thread.

With C, if you start an executable that's 5 kB, you use 5kB of memory. That's a lot of threads, huh ?

You say C is slow if used with Apache ?

That's because Apache is SLOW, use THTTP with FastCGI and be very surprised. You can have 500 concurrent users with CGI with no noticable system slowdown. Now try that with Apache (40 - 60 concurrent maximum).

Here's a good link to compare some languages (benchmark) :

http://scutigena.sourceforge.net/
You are proving my point. a 5kb C app might be small, but it will use libaries and all kind of other crap, and I said CGI (which 99% of the people referring to C web apps on this board will mean) is slower than a module like php calling a pre-compiled script. And yes, great, THTTPd and FastCGI is faster, I know it is. But who here would ever use THTTPd and FastCGI? The vast majority has never heard of FastCGI, let alone THTTPd.
__________________
"Think about it a little more and you'll agree with me, because you're smart and I'm right."
- Charlie Munger
Nathan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote