Python-cgi web or Perl-cgi script doubt

Michael Sparks ms at cerenity.org
Sat Jul 30 04:25:17 EDT 2005


praba kar wrote:
>        I want to know difference between
> Python-cgi and Perl-cgi and also I want
> to which one is efficient from the performance.

Possibly the most important difference between the two is when you're using
JUST cgi - ie no mod_perl, no mod_python, etc. With python, if your cgi is
structured to use more than one file, then your programs can be compiled
and stored on disk (compiled to something called bytecode). This can just
be loaded and executed immediately on subsequent runs.

With perl, the program needs to be loaded and recompiled with each run.

For small CGI systems this difference is negligible, but for large CGI based
systems (eg when using a large framework), these differences can become
very important - if you do not have the option to use mod_perl/mod_python
or similar.

However, many people running large web systems do tend to use mod_perl and
friends when using perl which discounts this argument pretty much
completely.

That said, I'd suggest looking to see *what* you want to do, look at what
*tools* are available and *then* decide which *language* to use. Personally
I find python nicer for this sort of things these days - larger because it
naturally encourages better strutcure. (And this is after having using perl
day-in, day-out for 5 years, and still liking perl :-)

Hope that's of some use,


Michael.




More information about the Python-list mailing list