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

From: Vadim Nasardinov (el-vadimo at comcast.net)
Date: Mon Mar 29 08:49:03 EST 2004

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
people might be interested in taking a look at 

  "Faster than C: Static Type Inference with Starkiller"
  Michael Salib
  March 26, 2004


    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

Posted on the users mailing list.