[ann] Minimal Python project

Paul Rubin phr-n2002b at NOSPAMnightsong.com
Sat Jan 11 16:22:38 EST 2003


"Edward K. Ream" <edream at tds.net> writes:
> I am inclined to disbelieve this claim.  Why should Psycho be able to do
> better than an optimizing C compiler applied to hand-written interpreter
> code and/or library code?  The only possibilities I can think of:
> 
> 1. The GIT somehow has access to enough run-time information to perform some
> truly excellent optimizations.
> 2. The granularity of the data processed by the GIT somehow is big enough to
> again affect some excellent optimizations.
> 3. There are other marvelous optimizations, unknown to me and available
> neither to Guido nor to an optimizing compiler that can be applied.

Fourth possibility: The CPython implementation, while highly flexible,
is not especially fast, and a faster interpreter can be written by
using different implementation techniques.  Also, it wasn't clear to
me but perhaps Minimal Python will include a native-code compiler
(Psyco-based or otherwise).

I've had the idea for a while that a "minimal" Python should actually
include some language extensions to improve execution speed.  For
example, being able to declare local variables and give type advice to
the compiler (like Lisp systems do) can make it possible to early-bind
class methods and slots to their callers.  That can avoid an awful lot
of dictionary lookups and speeds things up considerably.




More information about the Python-list mailing list