Typing system vs. Java

Christopher Barber cbarber at curl.com
Fri Aug 10 09:13:27 EDT 2001


"Alex Martelli" <aleaxit at yahoo.com> writes:

> "Christopher Barber" <cbarber at curl.com> wrote in message
> > Sometimes you can write C extensions for the slow parts, 
> > but in some cases you will have to start over.
> 
> Applications whose "performance bottleneck" is _100%_ of their code?!
> Never heard of any such thing.  10% to 20% seems to be common.  What
> counter-examples do you have in mind?

Not a bottleneck, but a continuous degredation of performance across the
entire application due to memory use, overhead for method dispatching, etc.
This situation is only likely to happen in very large OO applications.

There are also deployment situations where you might not be allowed to make
use of C extensions.

> > Don't get me wrong, Python is a great language and is useful for many
> types of
> > applications, but it is ridiculous to say that there aren't a significant
> > number of applications for which it does not have the required
> performance.
> 
> Not by itself, surely -- but, when using Python together with lower-level
> languages for that 10% to 20% of code whose speed really matters, I
> can't easily think of examples.

But why can't Python be fast enough without resorting to extensions?  Forcing
users to learn C in order to make their Python code fast detracts from
Python's advantage as a simple, easy-to-use language.

I think that adding features to allow Python powerful enough to remove the
need for extensions would be worth a little bit of extra complexity.  I
personally don't think that type declarations would add much complexity, but I
guess I can see how someone new to them might be confused.  Of course, that
same person would be lost once they had to learn C.

- Christopher



More information about the Python-list mailing list