Monday, August 2, 2010

PyOhio

This weekend I delivered a talk at PyOhio (an annual conference in Columbus, OH, USA) on PyPy and Unladen Swallow. The talk covered reasons that Python, the language, is hard to optimize, why CPython is slow, and a few optimizations that PyPy and Unladen Swallow have implemented. The slides from my talk are online, and the talk was recorded so a video will follow. I gave a similar talk to ChiPy (the Chicago Python user group), which was also recorded and the video is available. Both audiences were excited about the futures for PyPy and Unladen Swallow, and for the future of a faster Python.

Alex

8 comments:

  1. I do not understand why is python so hard to optimize- after all, LuaJIT is VERY fast, and I thought Lua has the same dynamical features as python. I'm no Python nor Lua expert, but it would be nice knowing...

    Thanks!

    ReplyDelete
  2. Did you actually watch the video? it's explained there.

    ReplyDelete
  3. Any chance of putting the slides somewhere that can be directed downloaded?

    ReplyDelete
  4. There's a link to download the slides on the right hand side. This link: http://www.scribd.com/document_downloads/direct/35240506?extension=pdf&ft=1281033139&lt=1281036749&uahk=mAWsHOEi/etYRUUXWst+oYKiWIU
    should also work.

    ReplyDelete
  5. I've seen the video, and the question I asked is not answered: what dynamic feature Python has that Lua doesn't?

    is such a specific feature responsible for the fast LuaJIT?

    Thanks.

    ReplyDelete
  6. The main meta-reason is that Python is a very complex language compared to lua, so you have to take into account a lot of things that you don't care about in lua. one example is new style classes with insane semantics about descriptors.

    ReplyDelete
  7. The author of Luajit, Mike Pall, participated in a long thread posted here http://lambda-the-ultimate.org/node/3851#comment-57700 , as well as Maciej and others.

    There, he said about python:
    "Python (the core language) just has different quirks that need to be worked around. But no show stoppers.
    What is more challenging, is to efficiently handle Python (the programming environment) with all of its classes and methods. In particular the plethora of container types, since you really want to inline their accessors.
    Since I don't believe in multi-language VMs, LuaJIT is pretty Lua-specific on all levels. Your best bet right now is to join the PyPy effort (they already handle the issues I mentioned)."

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete

See also PyPy's IRC channel: #pypy at freenode.net, or the pypy-dev mailing list.
If the blog post is old, it is pointless to ask questions here about it---you're unlikely to get an answer.