O'Reilly Open Source Convention
Books Safari Bookshelf Conferences O'Reilly Network

Arrow Home
Arrow Registration
Arrow Speakers
Arrow Keynotes
Arrow Tutorials
Arrow Sessions
Arrow At-a-Glance
Arrow Wiki
Arrow BOFs
Arrow Events
Arrow Exhibitors
Arrow Sponsors
Arrow Hotel/Travel
Arrow Venue Map
Arrow See & Do
Arrow Tips for
Arrow Press
Arrow Mail List



IronPython: A Fast Python Implementation for .NET and Mono
Jim Hugunin, Architect, Microsoft

Track: Python
Date: Wednesday, July 28
Time: 4:30pm - 5:15pm
Location: Mt. Hood


IronPython is a new Python implementation initially targeting the CLR. It compiles Python programs into verifiable IL that can run on any CLR platform including Microsoft's .Net and Novell's Mono.

  • Speed
  • Python can run fast on the CLR. IronPython-0.1 is 70% faster than Python-2.3 when running the standard pystone benchmark.

  • Integration
  • IronPython code can call existing CLR libraries and Python classes can extend CLR classes. Python modules can also be statically compiled into assemblies that can be used from C#, VB.net or any other CLR language.

  • Managed Code
  • Because IronPython generates verifiable IL with no dependencies on native libraries it can run in environments that require managed code.

    This talk will demonstrate IronPython and explore its capabilities in more detail.

    Hugunin provides additional background: "The Common Language Runtime (CLR) is a new platform designed to support a wide variety of programming languages. The platform's goal is to allow all of these languages to interoperate well with each other by providing a common foundation. This platform is implemented in both Microsoft's .NET and in two open source projects, mono and dotgnu. The Mono project is nearing a 1.0 release and will also be presented at OSCON.

    "Previous attempts to implement Python and other highly dynamic languages for the CLR have resulted in systems with extremely poor performance. Performance so bad that they were considered unusable.

    "Many years ago, I created Jython -- an implementation of Python for the JVM. This system has very good performance and is still in wide use today. When I read the stories about horrible performance of dynamic languages on the CLR I was surprised. I wanted to pinpoint the fatal flaw in the design of the CLR (.NET and Mono) that made it so bad for implementing dynamic languages. My plan was to write a short pithy article called, 'Why the CLR is a terrible platform for dynamic languages.'

    "Unfortunately, as I carried out my experiments, I found the CLR to be a surprisingly good target for dynamic languages, or at least for the highly dynamic specific case of Python. This was unfortunate because it meant that instead of writing a short pithy paper I had to build a full Python implementation for this new platform to see if there would be any hidden traps along the way.

    "This is the first work to show that one of the big dynamic open source languages can run well on the CLR (.NET and Mono). This contradicts a lot of popular wisdom and posturing out on the Net. While this work is focused on Python, these results should have relevance to implementing other dynamic languages such as Perl, PHP or Ruby on this new platform."

    Download presentation file

    O'Reilly Home | Privacy Policy

    © 2004, O'Reilly Media, Inc.