Python vs. Perl, which is better to learn?

Kragen Sitaker kragen at pobox.com
Thu May 23 03:10:17 EDT 2002


"Terry Reedy" <tjreedy at udel.edu> writes:
> Newcomer Troll:  Ha ha.  I just ran a comparative test and Python is
> WAAAY slow.
> 
> Pythoneer:  Can you give us some details?
> 
> NT:  Yeah.  My turbo-lang version took 1/100 second and Python took a
> *whole* second -- 100 times slower.

For an example, where Python came out to be 140 times slower than C in
a simple test, see
http://lists.canonical.org/pipermail/kragen-tol/2000-April/000571.html
--- fib(33), using the straightforward exponential-time algorithm, was
the microbenchmark.

For lots more examples, see the Great Computer Language Shootout, at
http://www.bagley.org/~doug/shootout --- the above performance is
pretty average, although Python fares considerably better in the
"real" problems (each program does the same thing) than in the
"artifical" problems (each program is written the same way).




More information about the Python-list mailing list