some comments for Python 3000

Courageous jkraska1 at san.rr.com
Sun Aug 13 15:08:44 EDT 2000


> Give me a magic-wand Python compiler that's able to reach, say,
> 50% rather than 10% of C++'s raw performance at a set of typical
> tasks; and my C++ use might diminish, say, from 20-25% of the
> components I write, down to 10-15%...

Point well taken. But suppose:

If, in a compiled environment, Python's function invocation cost
were in certain critical cases ("strict" functions, for example)
closer to C's than not, it would mean that writing that very
critical performance-sensitive function as a Python extension
module would always be the natural choice. Right now, that isn't
the case, because Python's function invocation cost is high enough
that in some peroformance-sensitive applications it needs to be
avoided for its own sake.

This is the predominate reason why the performance difference
between vectors (Python lists) and true linked lists cannot be
observed under normal use conditions under Python; it takes
very container comparisons before the poor scalability of the
Python vector for insert at-head or insert-in-middle makes itself
known, simply because Python's function invocation cost masks
any noticeable differences between the containers until they
are both very large.


C//



More information about the Python-list mailing list