Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'implicit': 0.07; 'ironpython': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'restriction': 0.09; 'underlying': 0.09; 'pm,': 0.11; 'extension': 0.14; 'wrote:': 0.14; 'cpython,': 0.16; 'enigma': 0.16; 'gil.': 0.16; 'impose': 0.16; 'jython': 0.16; 'kern': 0.16; 'multithread': 0.16; 'python;': 0.16; 'received:austin.res.rr.com': 0.16; 'self,': 0.16; 'very,': 0.16; 'structures': 0.16; 'exists': 0.19; 'interpret': 0.19; 'modules': 0.20; 'code,': 0.20; 'language': 0.20; 'code': 0.22; 'header:In-Reply-To:1': 0.22; 'mechanism': 0.22; 'gil': 0.23; 'subject:code': 0.23; 'java': 0.24; 'pointed': 0.25; 'rid': 0.29; 'compiling': 0.31; 'exists,': 0.31; 'received:res.rr.com': 0.31; 'it.': 0.31; 'to:addr:python-list': 0.32; 'done': 0.32; "i've": 0.33; 'relatively': 0.33; 'reference': 0.34; 'header:X-Complaints-To:1': 0.34; 'primary': 0.34; 'received:70': 0.34; 'received:rr.com': 0.35; 'header:User- Agent:1': 0.35; 'allow': 0.36; 'getting': 0.36; 'think': 0.36; "we're": 0.37; 'data': 0.37; 'some': 0.37; 'either': 0.37; 'but': 0.38; 'received:org': 0.38; 'though': 0.38; 'to:addr:python.org': 0.39; 'header:Mime-Version:1': 0.39; 'takes': 0.40; 'attempt': 0.40; 'would': 0.40; 'header:Received:5': 0.40; 'allows': 0.40; 'protection': 0.63; 'our': 0.63; 'world': 0.65; 'believe': 0.66; 'analysis': 0.74; 'protect': 0.76; 'eco': 0.84; 'elaborate': 0.84; 'freeze': 0.84; 'protected.': 0.84; 'alone.': 0.91; 'acknowledge': 0.96 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Robert Kern Subject: Re: a basic bytecode to machine code compiler Date: Sat, 02 Apr 2011 19:12:26 -0500 Organization: The Church of Last Thursday References: <4j7lp.5204$sS4.1784@newsfe11.iad> <4d95cba6$0$29992$c3e8da3$5496439d@news.astraweb.com> <4d96f49b$0$29992$c3e8da3$5496439d@news.astraweb.com> <4d977362$0$10551$742ec2ed@news.sonic.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: cpe-70-113-41-15.austin.res.rr.com User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 In-Reply-To: <4d977362$0$10551$742ec2ed@news.sonic.net> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 29 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1301789560 news.xs4all.nl 81478 [::ffff:82.94.164.166]:36095 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:2478 On 4/2/11 2:05 PM, John Nagle wrote: > There's no easy way to speed up Python; that's been tried. > It needs either a very, very elaborate JIT system, more complex > than the ones for Java or Self, or some language restrictions. > The main restriction I would impose is to provide a call that says: > "OK, we're done with loading, initialization, and configuration. > Now freeze the code." At that moment, all the global > analysis and compiling takes place. This allows getting rid > of the GIL and getting real performance out of multithread > CPUs. That is not the reason the GIL exists, and being able to "freeze" the code will not let you get rid of the GIL alone. CPython's GIL exists to protect the data structures internal to its implementation and provide implicit protection to C extension modules (making them relatively easy to write threadsafe). Reference counts are the primary data structures being protected. IronPython and Jython allow just as much dynamism as CPython, and they have no mechanism for "freezing" the code, but they do not have a GIL. I believe this has been pointed out to you before, but I don't think I've seen you acknowledge it. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco