Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Neal Becker Newsgroups: comp.lang.python.announce Subject: Re: [pythran] Pythran 0.7.4 is out! Date: Fri, 8 Jan 2016 07:49:35 -0500 Lines: 95 Approved: python-announce-list@python.org Message-ID: References: <20160107195139.GA23778@lakota> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de q7C4/3VTP9aUnj7OlbWJJgOfQ+llnkE97HOH2SDdcdJg== Return-Path: X-Original-To: python-announce-list@python.org Delivered-To: python-announce-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:: [': 0.03; 'url:pypi': 0.03; 'cpython': 0.05; 'python3': 0.05; '[0]': 0.07; '(sorry': 0.09; 'any)': 0.09; 'cc:addr:googlegroups.com': 0.09; 'intrusive': 0.09; 'of)': 0.09; 'target,': 0.09; 'tends': 0.09; 'url:github': 0.09; 'python': 0.10; 'jan': 0.11; 'template': 0.11; ':-)': 0.12; 'output': 0.13; 'syntax': 0.13; 'def': 0.13; 'thu,': 0.15; '*you*': 0.16; '2016': 0.16; 'delighted': 0.16; 'idx,': 0.16; 'item)': 0.16; 'magic': 0.16; 'numpy': 0.16; 'posting,': 0.16; 'pythonic': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'to:addr:freelists.org': 0.16; 'wrote:': 0.16; 'compilation': 0.18; 'runs': 0.18; 'subject:] ': 0.19; 'cc:addr:python.org': 0.20; 'cc:2**2': 0.20; 'work,': 0.21; 'simpler': 0.22; 'pass': 0.22; 'import': 0.24; '(most': 0.24; '(this': 0.24; 'header:In-Reply-To:1': 0.24; 'testing': 0.25; 'install': 0.25; 'compatible': 0.27; 'message-id:@mail.gmail.com': 0.27; "skip:' 10": 0.28; 'motivation': 0.29; 'array': 0.29; 'code': 0.30; 'checks': 0.30; 'non': 0.32; '[1]': 0.32; 'announce': 0.32; 'compiled': 0.32; 'run': 0.33; 'url:python': 0.33; 'extract': 0.33; 'flags': 0.33; 'traditional': 0.33; 'received:google.com': 0.35; 'c++': 0.35; 'generic': 0.35; 'level': 0.35; 'supports': 0.35; 'project': 0.36; 'url:org': 0.36; 'received:209.85': 0.36; '(and': 0.36; 'faster': 0.36; 'pm,': 0.36; 'thanks': 0.37; 'release': 0.37; 'version': 0.38; 'received:209': 0.38; 'build': 0.40; 'high': 0.60; 'total': 0.62; 'export': 0.63; 'improved': 0.63; 'more': 0.63; 'great': 0.63; 'it!': 0.64; 'continuous': 0.66; 'here': 0.66; 'laptop': 0.67; 'repeat': 0.67; 'dear': 0.67; 'special': 0.73; 'boost.python': 0.84; 'construct': 0.84; 'cc:no real name:2**2': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fY6LGdA9XBdiaTlwxrHozkgUDKoB4Tf1uFh/Jlnnwq4=; b=U6pe/Yq5BYa+rjESnbyKA0CUAXQ/C0AZPTKqprZd7eFRgs5v0NiTIeLeSBKUK1pLOJ QWo1Hpt1aa6wUAsdHz3GzJkbGIQvROWX2nogrqvU3azniv+Z4xdDj5SKmA7b2fRYqwLJ 26PH/tST8SuoFF6YRRcrLkY9lnAAwQYROurKyEIiDsmQKt+M2QdfvhRBTDO6XOQXIqkb M7bUq8CIUzIlgdikZ09IZGHl55kbbaepEnUG6yBYUDSzejiByLMA2Vy/gkyk2imNBNd+ Cu84qAoOoRVFTm9Bf56xmRb38Kt5DcmGn042BFeP7d9vlsakJxECptNbN0+89ZO8nn3N u76w== X-Received: by 10.13.204.86 with SMTP id o83mr79555482ywd.297.1452257375302; Fri, 08 Jan 2016 04:49:35 -0800 (PST) In-Reply-To: <20160107195139.GA23778@lakota> X-Mailman-Approved-At: Sat, 09 Jan 2016 09:51:29 -0500 X-Content-Filtered-By: Mailman/MimeDel 2.1.20+ X-BeenThere: python-announce-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: Announcement-only list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python.announce:1970 How do I build pythran3? On Thu, Jan 7, 2016 at 2:51 PM, serge guelton < serge.guelton@telecom-bretagne.eu> wrote: > (sorry for the double posting, if any) > > Dear pythraners and pythonists, > > The pythran team (a great total of 2 active developers) is delighted to > announce the release of Pythran 0.7.4, available on the traditional > channels: > > - pypi: https://pypi.python.org/pypi/pythran > - conda: https://anaconda.org/serge-sans-paille/pythran > - github: https://github.com/serge-sans-paille/pythran > > As usual, here is a (new) code sample, once again adapted from a > stackoverflow question[0] that showcases pythran capability: > > > #pythran export check_mask(bool[][], bool[]) > # ^~~~~~~ non intrusive top-level annotation > > import numpy as np > # ^~~~~~ numpy support (partial) > def check_mask(db, out, mask=[1, 0, 1]): > for idx, line in enumerate(db): > target, vector = line[0], line[1:] > # ^~~~~ type destructuring, array view > if (mask == np.bitwise_and(mask, vector)).all(): > # ^~~~~~~ optimization of high level construct > if target == 1: > out[idx] = 1 > return out > > > Compiled with: > > % pythran check_mask.py > > And benchmarked with: > > % python -m timeit -s 'n=10e3 ; import numpy as np;db = > np.array(np.random.randint(2, size=(n, 4)), dtype=bool); out = > np.zeros(int(n),dtype=bool); from eq import check_mask' 'check_mask(db, > out)' > > On average, the CPython version runs in 137 msec while the pythran version > run in 450us on my laptop :-) > > > Here is an extract of the changelog: > > 2016-01-05 Serge Guelton > > * IPython's magic for pythran now supports extra compile flags > > * Pythran's C++ output is compatible with Python3 and pythran3 can > compile it! > > * More syntax checks (and less template traceback) > > * Improved UI (multiline pythran exports, better setup.py...) > > * Pythonic leaning / bugfixing (this tends to be a permanent item) > > * More generic support for numpy's dtype > > * Simpler install (no more boost.python deps, nor nt2 > configuration) > > * Faster compilation (no more boost.python deps, smarter pass > manager) > > * Better testing (gcc + clang) > > Again, thanks a lot to Pierrick for his continuous top-quality work, and > to the OpenDreamKit[1] project that funded (most of) the recent > developments! > > Special thanks to @hainm, @nbecker, @pkoch, @fsteinmetz, @Suor for their > feedbacks. *You* give us the motivation to go on! > > > [0] > http://stackoverflow.com/questions/34500913/numba-slower-for-numpy-bitwise-and-on-boolean-arrays > [1] http://opendreamkit.org/ > -- *Those who don't understand recursion are doomed to repeat it*