Van wrote:
>
> Sasha Pachev wrote:
> >
> > I finally got around to installing PHP on our web
> > server, and to celebrate the event, I decided to run a
> > simple benchmark to compare CGI's in C, C++, Perl and
> > SSI, PHP, and raw HTML. I must admit that the benchmark
> > was greatly skewed to favor server parsed languages. The
> > measurement in question was the response time for a
> > request that would send the following HTML:
> >
> > <html><body>Hello,world</body></html>
> >
> > So really the test was about how it it takes to get
> > started, since the amount of time it takes to send the
> > result over 10MB Ethernet is less than 1ms. So here are
> > the results (Linux 2.0.29, Pentium II 233, 64 MB RAM, UW
> > SCSI, Apache 1.3.6 with PHP 3.0.7):
> >
> > 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.
> >
> > --
> > Sasha Pachev
> > http://www.sashanet.com/ (home)
> > http://www.direct1.com/ (work)
> Sasha,
> I'm quite encouraged. Does this mean I don't have to learn PERL? >:)
> Thanks for the test. Much useful.
> Van
Remember, this is just "Hello, world", who can get to the starting line
the fastest type of comparison. Many web applications spend majority of
the response time just getting to the start, and for those this test
indicates that PHP is probably the best solution. However, if there is
any kind of race beyond the starting line, things will change quite a
bit.
--
Sasha Pachev
http://www.sashanet.com