> Sasha Pachev wrote:
> >
> > Method Response time (ms)
> > static HTML 2
> > SSI 4
> > PHP 5
> >
> > Statically
> > linked
> > C CGI 6
> >
> > Dynamically
> > linked C CGI 9
> >
> > Raw Perl CGI 16
> >
> > Statically
> > linked C++ CGI 19
> >
> > Perl CGI
> > with
> > require 'cgilib.pl' 37
> >
> > Dynamically
> > linked C++ CGI 39
> >
> > Again this is all about getting started. Just "Hello,
> > world", that's it. Obviously the results will change
> > quite a bit on a more complex program. I will probably
> > do more tests tomorrow and publish the results. If any
> > body has any suggestions/requests, let me know.
> >
Comparing executing a binary from the filesystem via the cgi to
PHP and SSI is mixing apples with oranges.
In order to compare PHP with C or perl, you need to be using C
or perl in a context like mod_perl or in C, using the apache API.
I'll bet that if you wrote a C program which prints hello world
and build it into apache using the api it would be even faster
than static html!
With mod_perl and jserv, programs/interpreters are no longer called
from the filesystem with each program execution. Basically they are
"pulled into" the web server once and run after in the web server's
memory space. I like mod_perl because it has all the power of perl
and it is very fast. If you are still using CGI to run programs and
you are looking for great increases in speed you might want to look
at mod_perl or jserv (java).
Mark