Message from discussion
unladen swallow: python and llvm
Path: g2news2.google.com!news1.google.com!news.glorb.com!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail
Date: Thu, 11 Jun 2009 11:21:07 +0200
From: Stefan Behnel <stefan...@behnel.de>
User-Agent: Thunderbird 2.0.0.21 (X11/20090318)
MIME-Version: 1.0
Newsgroups: comp.lang.python
Subject: Re: unladen swallow: python and llvm
References: <ebc879d8-84eb-4ed0-9fd7-4618b4f0cb12@n4g2000vba.googlegroups.com> <slrnh2hmc3.f35.nick@irishsea.home.craig-wood.com>
In-Reply-To: <slrnh2hmc3.f35.nick@irishsea.home.craig-wood.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Lines: 19
Message-ID: <4a30cc84$0$32668$9b4e6d93@newsspool2.arcor-online.net>
Organization: Arcor
NNTP-Posting-Date: 11 Jun 2009 11:21:08 CEST
NNTP-Posting-Host: 906aa629.newsspool2.arcor-online.net
X-Trace: DXC=QNAWJbjf;04nBOkdL^Lo7>A9EHlD;3Yc24Fo<]lROoR1^YC2XCjHcb9QKXDaOV=7=<IG0]NbAI0E0PTo6B>0[5_6?2aPkB<cd<04MkX^KlFRM?
X-Complaints-To: usenet-abuse@arcor.de
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.
http://cython.org/
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).
Stefan