Introduction to the Python programming language
5.2. The Shootout
This is a comprehensive test in many areas of programming which
compares more than 30 different languages (not every language is
included in every test).
I took a few of the (IMHO) most interesting tests and decided to show
them here.
As the code for the most of the tests is pretty long, I won't display
them here, but you can view them at
http://www.bagley.org/~doug/shootout/.






In most cases, Java uses less CPU time, but much more memory than
Python. Python showed itself pretty good in the List Processing, Regexp
Matching and String Concatenation benchmarks, which shows Pythons'
superiorness in handling lists and strings.