How does Python compare to ?

Donn Cave donn at u.washington.edu
Mon Jul 31 13:07:13 EDT 2000


Quoth claird at starbase.neosoft.com (Cameron Laird):
| In article <Pine.GSO.4.10.10007311048410.10092-100000 at sundial>,
| Moshe Zadka  <moshez at math.huji.ac.il> wrote:
| 			.
|> Of course -- heck, even I use CGI for most of my web solutions. The thing
|> is, I'm not (currently) a web developer -- so when I have a problem to
|> solve, the most important thing for me is how long it takes to set up
|> the solution. For that, CGI rocks. However, as soon as you care about
|> either performance or about program scalability (IOW, once it's beyond
|> a form-to-send-mail and its ilk) (and if you don't, then the only
|> difference between Java servlets, PHP-plugin and Python CGI is the
|> syntax), the CGI is the most horrible solution available. 
|> 
|> CGI requires always a process startup and usually interpreter (be it 
|> Tcl, Guile, Perl or Python) startup. That makes it unacceptable if there
|> are more then 2 hits/second.
| 			.
| 			.
| 			.
| I'm stuck.  It's going to be hard replying without
| invocation of the canard about democracy being "the
| most horrible solution available"--except for all
| the rest.
|
| Moshe and I are in agreement on all points, except
| that I have customers receiving 20 hits per second
| which they're contentedly satisfying with CGI-based
| service.  Years ago, I thought it was ugly.  Now, I
| just think I have bigger problems, and let CGI toil
| on.

The platform could make a difference here, if two web sites were
running the same kind of CGI service on different platforms, for
example a UNIX host versus some other platform that by reputation
has a lot more overhead starting new processes.

But it has to be partly the interpreter too.  A casual test on
FreeBSD 4.0 with Python 1.5.2 against the system shell and various
interpreters says Python takes 10 times as long to get started and
print out "hello".  (This is elapsed time, on an unloaded host where
elapsed ~ user+system.)  Bash and awk take 2 or 3 times as long,
perl is somewhere in between.  On my computer here (Intel PII 450mhz),
I would guess 20 real Python programs per second, plus httpd, would
be past the limit of what we could do.

	Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list