[plt-scheme] Re: static type inference for Python (was: Re: An Editors Tale)

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Mar 29 08:52:22 EST 2004

The good news: the references indicate that the person is aware
of two or three critical relevant papers (out of about 100).

The bad news: I don't see any concrete evidence for the title.
I have seen such claims for Scheme for almost 12 years. These
people compiled entire programs and claimed to beat C. I
badly want to believe them but I can't replicate their results.
[It's not for a lack of trying either.]

Given that Python is even more dynamic than Scheme, I won't
believe this kind of thing until I can install this mythical
Python compiler on my machine and watch it beat C on the average.

Good luck -- Matthias

On Mar 29, 2004, at 8:49 AM, Vadim Nasardinov wrote:

> On Thu, 29 Jan 2004 16:38:50 -0500, Matthias Felleisen wrote:
>> Jeremy and I had a brief discussion on this at LL3. I believe that
>> the features I dislike are hard-wired into Python and are acclaimed
>> to be major components. So I doubt that the Python community is
>> interested in listening to people like us.
> As a follow-up to this earlier thread
> http://list.cs.brown.edu/pipermail/plt-scheme/2004-January/ 
> thread.html#4615
> people might be interested in taking a look at
>  "Faster than C: Static Type Inference with Starkiller"
>  Michael Salib
>  March 26, 2004
>  http://www.python.org/pycon/dc2004/papers/1/paper.pdf
>    Abstract
>    Pure Python code is slow, primarily due to the dynamic nature of
>    the language. I have begun building a compiler to produce fast
>    native code from Python source programs. While compilation can
>    improve performance, any such gains will be modest unless the
>    compiler can statically resolve most of the dynamism present in
>    source programs. Static type inference for Python programs would
>    enable the safe removal of most type checks and most instances of
>    dynamic dispatch and dynamic binding from the generated
>    code. Removing dynamic dispatch and binding leads to large
>    performance benefits since their existence precludes many
>    traditional optimization techniques, such as inlining. I have
>    built a static type inferencer for Python called Starkiller. Given
>    a Python source file, it can deduce the types of all expressions
>    in the program without actually running it. Starkiller's primary
>    goal is to take a Python source program as input and deduce the
>    information needed to make native code compilation of that program
>    easy. This paper is describes Starkiller's design and
>    operation. It is partially adapted from a draft of my Master's
>    thesis.

Posted on the users mailing list.