in reply to Don't use CGI;

This is one benchmark.. somewhat dated, but good for a general idea.

You might also find this article to be interesting too...

By and large, I've found that JSPs can be as fast as mod_perl, (Note: JSP have to play catchup to equal mod_perl performance, with a specialized JRE like IBM, and lots of other trickery besides) but the usual disclaimer applies, it depends a lot on what you're doing with mod_perl and JSPs, so these benchmarks should be taken with a more than a few grains of salt.. :o)

CGI is slower because of the overhead of starting up an interpreter for each invocation of the script, and all of these benchmarks seem to prove this.. so, yes, for the most part, mod_perl over CGI is true where performance is concerned...

As in a recent thread though, I'd prefer mod_perl (and Perl in general) over JSP (and Java) for an entirely different set of reasons.. YMMV :o)
HTH

Replies are listed 'Best First'.
Re: Don't use CGI;
by Dominus (Parson) on Apr 17, 2001 at 17:39 UTC
    Says tinman:
    This is one benchmark
    Thanks a lot for the reference. I had not seen that before.

    The thing I found really striking about that page is how deceptive it is. The various platforms are ordered by raw hits per second, and so mod_perl comes in second place. But if you don't look carefully, you won't notice that mod_perl was running on a PIII-500, and the JSP/Java test was running on a P266.

    --
    Mark Dominus
    Perl Paraphernalia

Re: Re: Don't use CGI;
by Jonathan (Curate) on Apr 17, 2001 at 17:21 UTC
    Thanks tinman using mod_perl/Apache::Registry enables you to forego the cost of re-compiling the scripts on each evocation, but I wasn't aware of JSP's strength.
    I'd prefer to use Perl as I know it a lot better but I'm not going to do a Canute if the tide has turned.