Linked by Christopher W. Cowell-Shah on Thu 8th Jan 2004 19:33 UTC
General Development This article discusses a small-scale benchmark test run on nine modern computer languages or variants: Java 1.3.1, Java 1.4.2, C compiled with gcc 3.3.1, Python 2.3.2, Python compiled with Psyco 1.1.1, and the four languages supported by Microsoft's Visual Studio .NET 2003 development environment: Visual Basic, Visual C#, Visual C++, and Visual J#. The benchmark tests arithmetic and trigonometric functions using a variety of data types, and also tests simple file I/O. All tests took place on a Pentium 4-based computer running Windows XP. Update: Delphi version of the benchmark here.
Permalink for comment
To read all comments associated with this story, please click here.
To Author: Python benchmark a bit misleading
by Critic on Sat 10th Jan 2004 00:10 UTC

The starting page claims you test 32-bit and 64-bit math. Python doesn't use native 64-bit types on 32-bit architectures if I recall, and promotes all integers that don't fit into a native type into long (arbitrary-precision) integers. Long integers don't use hardware multiplication or specialized algorithms, while all of the other languages do use those, doing Python some injustice. I think this should've been mentioned at the beginning of the article, because what Python is doing isn't really 32-bit math or 64-bit math in the sense that most programmers are used to.

You could also do much better in some tests by using Numeric Python/numarray, which is designed for these kinds of problems.

And about Perl vs. Python: both are compiled into intermediate code, in Perl it just has a different form.