Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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; 'mrab': 0.05; 'subject:Python': 0.06; 'friday,': 0.09; 'optimizing': 0.09; 'portions': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'replied': 0.09; 'rewrite': 0.09; 'runs': 0.10; 'extension,': 0.16; 'itself,': 0.16; 'kern': 0.16; 'limiting': 0.16; 'numpy': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'underlying': 0.16; 'wrote:': 0.18; 'obviously': 0.18; 'header:User-Agent:1': 0.23; 'interpret': 0.24; "i've": 0.25; 'possibly': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; 'chris': 0.29; 'robert': 0.30; 'code': 0.31; '20%': 0.31; 'fixing': 0.31; 'lot.': 0.31; 'subject:what': 0.31; 'subject:the': 0.34; 'problem': 0.35; 'but': 0.35; 'subject:?': 0.36; 'should': 0.36; 'performance': 0.37; 'to:addr:python-list': 0.38; 'itself': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'days': 0.60; 'most': 0.60; 'identify': 0.61; 'john': 0.61; 'our': 0.64; 'within': 0.65; 'world': 0.66; 'believe': 0.68; 'increase': 0.74; 'eco': 0.84; 'simulations': 0.84; 'subject:latest': 0.84; 'terrible': 0.84; 'week!': 0.93; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Robert Kern Subject: Re: JIT compilers for Python, what is the latest news? Date: Fri, 05 Apr 2013 10:46:22 +0100 References: <6ac24546-6cc6-4a01-9fa6-3b52d64484e3@googlegroups.com> <590d71e1-5f78-475e-a5bc-8210694a7616@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 213.1.240.226 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 In-Reply-To: <590d71e1-5f78-475e-a5bc-8210694a7616@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1365275593 news.xs4all.nl 6940 [2001:888:2000:d::a6]:44738 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42933 On 2013-04-05 09:39, John Ladasky wrote: > On Friday, April 5, 2013 1:27:40 AM UTC-7, Chris Angelico wrote: >> 1) Can you optimize your algorithms? Three days of processing is... a LOT. > > Neural network training. Yes, it takes a long time. Still, it's not the most tedious code I run. I also do molecular-dynamics simulations with GROMACS, those runs can take over a week! > >> 2) Rewrite some key portions in C, possibly using Cython (as MRAB suggested). > > And as I replied to MRAB, my limiting code is within Numpy. I've taken care to look for ways that I might have been using Numpy itself inefficiently (and I did find a problem once: fixing it tripled my execution speed). But I would like to think that Numpy itself, since it is already a C extension, should be optimal. Well, Psyco obviously wasn't optimizing numpy. I believe the suggestion is to identify the key parts of the code that Psyco was optimizing to get you the 20% performance increase and port those to Cython. -- 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