how fast is Python?

Travis Whitton whitton at atlantic.net
Thu Aug 21 10:42:26 EDT 2003


If you haven't seen this, you should check it out. It compares a variety 
of languages to each other, and it's probably the best site on the
internet for side-by-side language comparisons:

http://www.bagley.org/~doug/shootout/

-Travis

In article <fbf8d8f2.0308201208.3b9c2d01 at posting.google.com>, dan wrote:
> It would be an understatement to say I love this language.  What used
> to take me all day now takes 3 hours, and I can spend the rest of the
> time on my bike thinking about the problems from a high level instead
> of wrestling with arcane compiler problems, etc.
> 
> Back in the day, when looking at an interpreted language (or even
> compiled ones) the first thing I would ask is, "how fast is it?" 
> These days, with 1ghz processor machines selling for < $500, it seldom
> comes up as an issue.  And of course in Py's case you can always
> 'extend and embed' your core routines for fun & profit.
> 
> However, there are definitely cases where a lot of code would need to
> be optimized, and so I ask the question:  How fast is Python, compared
> to say a typical optimizing C/C++ compiler?
> 
> I realize this is a more complex question than one might think.  There
> are various types of code constructs that might end up with different
> efficiency issues.  I guess what I'm asking is, in a general sense,
> how fast is it now for typical code sequences, and -- importantly --
> what could be done to optimize the interpreter?  Are any parts written
> in assembly?  Could things like hash tables be optimized with parallel
> units such as MMX?  Etc.
> 
> Please advise.





More information about the Python-list mailing list