Message from discussion unladen swallow: python and llvm
Date: Thu, 11 Jun 2009 11:21:07 +0200
From: Stefan Behnel <stefan...@behnel.de>
User-Agent: Thunderbird 22.214.171.124 (X11/20090318)
Subject: Re: unladen swallow: python and llvm
References: <email@example.com> <firstname.lastname@example.org>
Content-Type: text/plain; charset=UTF-8
NNTP-Posting-Date: 11 Jun 2009 11:21:08 CEST
Nick Craig-Wood wrote:
> Luis M GonzĂˇlez wrote:
>> I am very excited by this project (as well as by pypy) and I read all
>> their plan, which looks quite practical and impressive.
>> But I must confess that I can't understand why LLVM is so great for
>> python and why it will make a difference.
> CPython uses a C compiler to compile the python code (written in C)
> into native machine code.
That would be Cython: compile Python code to (optimised) C code and then
run a C compiler over that to get native machine code.
CPython compiles Python code to *byte-code* and then *interprets* that in a
virtual machine (which happens to be written in C, hence the name).