Path: csiph.com!usenet.pasdenom.info!news.franciliens.net!fdn.fr!usenet-fr.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!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; 'python.': 0.02; 'python,': 0.02; 'subject:Python': 0.06; 'arrays': 0.09; 'assumed': 0.09; 'bytes,': 0.09; 'friday,': 0.09; 'implemented.': 0.09; 'rewrite': 0.09; 'expects': 0.16; 'extension,': 0.16; 'integers,': 0.16; 'internally': 0.16; 'numpy': 0.16; 'such,': 0.16; 'all.': 0.16; 'wrote:': 0.18; 'passing': 0.19; "python's": 0.19; 'handles': 0.22; 'pass': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'post.': 0.31; 'routine': 0.31; 'subject:what': 0.31; 'class': 0.32; 'fri,': 0.33; 'implemented': 0.33; 'subject:the': 0.34; 'received:209.85': 0.35; 'received:209.85.220': 0.35; 'case,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'doing': 0.36; 'subject:?': 0.36; 'similar': 0.36; 'received:209': 0.37; 'performance': 0.37; 'expected': 0.38; 'ends': 0.38; 'to:addr :python-list': 0.38; 'fact': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'even': 0.60; 'ian': 0.60; 'improved': 0.60; 'john': 0.61; 'back': 0.62; 'benefit': 0.68; 'improvement.': 0.68; 'compiles': 0.84; 'compiling': 0.84; 'subject:latest': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=QfiasFqFuUIHe6HSmpZ5NI4s5bwPOGEDfnYYOIuDCSI=; b=f+JXWTNHwUvY7R0/I9kYHdl9O4BeAqG87O2pKCrU5ELSt9YxynX19eurI+NCOFItfQ QTMwAOAMOon/kxYVx47xaDP90UWu6bQhwAcCKgEZ44lqX4axOqDBYhdHsXJmlS6v6gC9 5rR8NNzvNZ21cgC9d6XKf5DD0hunXDdd5K0uYqL7cv+in4mUM8aEn6IK6oYNJpx7upD6 htWATIQJo3Eg/keYIP6y2eRYSo+2WL/4PeWeD5JrkGGJ7HcKF6y8Rq8v0JkHDTQLvRrU wu8dRLHAYUOQY103oq+v7XMtg2OeAL8uSYQNCdXC1UYC0+DRO2dUBFPTun8Doa1v/pyn HVUg== X-Received: by 10.66.250.230 with SMTP id zf6mr17057366pac.153.1365188747710; Fri, 05 Apr 2013 12:05:47 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <7b11dcee-12ee-4dac-a8aa-2e9ff1a66262@googlegroups.com> References: <6ac24546-6cc6-4a01-9fa6-3b52d64484e3@googlegroups.com> <590d71e1-5f78-475e-a5bc-8210694a7616@googlegroups.com> <7b11dcee-12ee-4dac-a8aa-2e9ff1a66262@googlegroups.com> From: Ian Kelly Date: Fri, 5 Apr 2013 13:05:07 -0600 Subject: Re: JIT compilers for Python, what is the latest news? To: Python Content-Type: text/plain; charset=ISO-8859-1 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1365188751 news.xs4all.nl 6989 [2001:888:2000:d::a6]:47386 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42845 On Fri, Apr 5, 2013 at 12:13 PM, John Ladasky wrote: > On Friday, April 5, 2013 10:32:21 AM UTC-7, Ian wrote: > >> That doesn't seem to follow from your original post. Because Numpy is >> a C extension, its performance would not be improved by psyco at all. > > What about the fact that Numpy accommodates Python's dynamic typing? You can pass arrays of integers, floats, bytes, or even PyObjects. I don't know exactly how all that is implemented. I don't know exactly either, but psyco JIT compiles Python, not C. In the PyObject case you might see some benefit if numpy ends up calling back into methods that are implemented in Python. > In my case, I was always passing floats. So what I assumed that psyco was doing for me was compiling a neural network class that always expected floats. Right, so if you take that routine and rewrite it as a C function that expects floats and handles them internally as such, I would think that you might see a similar improvement.