Unladen Swallow: LLVM based Python compiler

The second release of Unladen Swallow was made available yesterday. The project plan describes the goals as follows:

We want to make Python faster, but we also want to make it easy for large, well-established applications to switch to Unladen Swallow.

  1. Produce a version of Python at least 5x faster than CPython.
  2. Python application performance should be stable.
  3. Maintain source-level compatibility with CPython applications.
  4. Maintain source-level compatibility with CPython extension modules.
  5. We do not want to maintain a Python implementation forever; we view our work as a branch, not a fork.

Of course, Google is known for writing a lot of their software in Python, and now they are trying to speed it up, just like the V8 project has done for JavaScript.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

... and

... and TraceMonkey is doing for JavaScript.

....and

I don't care until we get optional static type inference in a Python-like language.

oops..we already have it in Boo.

Why an organization like Google wastes its time in a dynamically-typed language like Python is beyond all of us.

Perhaps because time isn't everything

When time is everything, Google uses C++.

I don't think Dave's point

I don't think Dave's point was about the waste of run time...

In all fairness...

...Boo wasn't available when Google started using Python. Not to mention that the static/dynamic type system debate is a legitimate debate, one that's been hashed and rehashed many times here on LtU.

Personally, I'm a bit agnostic, although I definitely appreciate the influence that Hindley-Milner type systems have had on my thought processes. I usually pretend to use it even when I'm writing Python or Scheme code, although I have seen a few cases where static types do get in the way.

I know a few programmers that are much more skilled than myself that dislike static typing; one argues that the problems they solve are pretty trivial, and that if he is really concerned about the correctness of some piece of code, he'll write his own verifier that will check much more than type systems can. And given my own experience, I see his point; rarely are my Python or Scheme bugs type-related.

Another argues that dynamic types really don't speed up code all that much; a good compiler can eliminate a significant quantity of dynamic type checking, not to mention that dynamic type checking is fairly cheap compared to say, memory latency.

On the other hand, the best argument I've heard for static checking is probably Yaron Minsky's; instead of more traditional "it's safer" or "it's more efficient" type of arguments, he uses it to make sure that pattern matching is exhaustive, and to detect where code needs to be modified when new cases are added to an existing datatype.

Also, I know there is at least one program that I could not have written without the help of the type system; in this case I knew the interface it was supposed to have (a partial type), but had no idea what the rest of the type or the implementation looked like. So I started going through the catalog of monads until I found a type and implementation that worked.

I wonder what counts as a

I wonder what counts as a "Python like language"? Suppose we would face-lift Python and apply an ML like syntax. Would it then count as an "ML like language"?

BTW I don't believe Google made authoritative statements about which language to use. Instead they let programmers choose from a fixed range of languages including C++, Java, Python and JavaScript. Apparently Google has abandoned the big uncle who knows everything better than the programmers who are told to be otherwise responsible and get peer-reviewed. Can't say how much Google suffered from this because no one ever claimed it does.