Python as a numerical prototyping language.

Oren Tirosh oren-py-l at hishome.net
Wed Dec 17 20:54:30 EST 2003


On Wed, Dec 17, 2003 at 11:41:16AM +0100, Mark Dufour wrote:
> > When operations are done on individual objects Python is significantly
> > slower than compiled languages but psyco is making great progress in this
> > area. It already approaches the performance of C for simple code using
> > only integers and floats.
> 
> What are the opinions about Psyco being able to achieve the same great 
> speedups for non-simple code at some point in the future? Is the looking up 
> of methods/attributes during run-time the biggest problem here? 

Object semantics are indeed the issue. I think that there are tricks that
could bring it very close to the performance of statically typed languages, 
though. Something like caching of object attribute accessors using hash 
tables indexed by the object type and the interned method name, possibly
combined with some dynamically generated code.

> I would assume that with ever-increasing computer speeds there's no 
> theoretical limit to what might be possible here.. exciting stuff, this!

Improvement in computer speeds will do nothing to the performance gap
between Python and a compiled language running on the same computer. It
could make them irrelevant because both are fast enough. This is already 
true for Python on modern processors for all but a handful of compute-
intensive applications - the original subject of this thread.

    Oren





More information about the Python-list mailing list