Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'computing,': 0.07; 'pypy': 0.07; 'tool,': 0.07; 'compilers.': 0.09; 'slow.': 0.09; 'subject:skip:a 10': 0.09; 'url:github': 0.09; 'python': 0.11; 'bonus.': 0.16; 'caches': 0.16; 'compares': 0.16; 'crop': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'subroutine': 0.16; 'wrote:': 0.16; 'compilation': 0.18; 'module,': 0.18; 'lawrence': 0.22; 'am,': 0.23; "i've": 0.24; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'url:article': 0.27; 'function': 0.30; 'subject:time': 0.31; 'run': 0.32; 'similar': 0.32; 'compiled': 0.32; 'another': 0.34; 'quickly': 0.34; 'running': 0.34; "i'll": 0.34; 'that,': 0.34; 'message-id:@gmail.com': 0.35; 'could': 0.35; 'to:addr:python- list': 0.35; 'c++': 0.35; 'execution': 0.35; 'heard': 0.36; 'subject:: ': 0.37; 'received:org': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'subject:-': 0.39; 'mark': 0.40; 'why': 0.40; 'some': 0.40; 'hope': 0.61; 'real': 0.61; 'heavy': 0.81; 'compiles': 0.84; 'computation,': 0.84; 'dialect': 0.84; 'ever-growing': 0.84; 'loose': 0.84; 'suggest,': 0.84 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Fri, 26 Jun 2015 11:32:48 -0600 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: HOPE: A Python just-in-time compiler for astrophysical computations References: <55898f07$0$3088$426a74cc@news.free.fr> In-Reply-To: <55898f07$0$3088$426a74cc@news.free.fr> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1435339981 news.xs4all.nl 2948 [2001:888:2000:d::a6]:35474 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:93199 On 06/23/2015 10:53 AM, Laurent Pointal wrote: > Mark Lawrence wrote: > >> Another beasty I've just stumbled across which you may find interesting >> http://www.sciencedirect.com/science/article/pii/S2213133714000687 > > Why use a JIT complation when you could use some C++ generation then > compilation as Python module, like with Pythran ? > > https://github.com/serge-sans-paille/pythran > > For heavy computing, you may loose some time before running computation, to > have (generate) the right tool, then do the job with real bonus. Not really. I suspect Hope caches the compiled subroutine so only the very first running of the function on the very first execution of the pthon program will be slow. After that, the program will run quickly each time. It's a pretty good idea. I've never heard of pythran; I'll have to check it out and see how it compares to the ever-growing crop of Python dialect compilers. Cython could be used in a similar way as you suggest, and in PyPy we have the RPython dialect that compiles to C.