<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0"><id>tag:blogger.com,1999:blog-3971202189709462152</id><updated>2017-01-31T03:43:59.713+01:00</updated><category term="numpy" /><category term="jit" /><category term="pypy3" /><category term="stm" /><category term="pypy" /><category term="cffi" /><category term="speed" /><category term="CPython" /><category term="extension modules" /><category term="revdb" /><category term="sprint" /><category term="PyQt4" /><category term="RPyC" /><category term="Smalltalk" /><category term="Squeak" /><category term="arm" /><category term="cli" /><category term="compiler" /><category term="cpyext" /><category term="ep2008" /><category term="jython" /><category term="kcachegrind" /><category term="parser" /><category term="profiling" /><category term="roadmap" /><category term="sun" /><category term="valgrind" /><title type="text">PyPy Status Blog</title><subtitle type="html" /><link rel="alternate" type="text/html" href="http://morepypy.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default?start-index=26&amp;max-results=25&amp;redirect=false" /><author><name>Carl Friedrich Bolz</name><uri>http://www.blogger.com/profile/00518922641059511014</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img1.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>359</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/PyPyStatusBlog" /><feedburner:info uri="pypystatusblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-3831779797804484935</id><published>2017-01-24T12:01:00.000+01:00</published><updated>2017-01-24T12:13:01.193+01:00</updated><title type="text">Leysin Winter Sprint: 25/26th Feb. - 4th March 2017</title><content type="html">&lt;p&gt;The next PyPy sprint will be in Leysin, Switzerland, for the twelveth time.
This is a fully public sprint: newcomers and topics other than those
proposed below are welcome.&lt;/p&gt;
&lt;div class="section" id="goals-and-topics-of-the-sprint"&gt;
&lt;h3&gt;Goals and topics of the sprint&lt;/h3&gt;
&lt;p&gt;The list of topics is very open.&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;The main topic is Python 3.5 support in PyPy, as most py3.5
contributors should be present.  It is also a good topic if you have
no or limited experience with PyPy contribution: we can easily find
something semi-independent that is not done in py3.5 so far, and
do pair-programming with you.&lt;/li&gt;
&lt;li&gt;Any other topic is fine too: JIT compiler optimizations, CFFI,
the RevDB reverse debugger, improving to speed of your program on
PyPy, etc.&lt;/li&gt;
&lt;li&gt;And as usual, the main side goal is to have fun in winter sports :-)
We can take a day off (for ski or anything else).&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="exact-times"&gt;
&lt;h3&gt;Exact times&lt;/h3&gt;
&lt;p&gt;Work days: starting 26th Feb (~noon), ending March 4th (~noon).&lt;/p&gt;
&lt;p&gt;I have pre-booked the week from Saturday Feb 25th to Saturday March 4th.
If it is possible for you to arrive Sunday before mid-afternoon, then
you should get a booking from Sunday only.  The break day should be
around Wednesday.&lt;/p&gt;
&lt;p&gt;It is fine to stay a few more days on either side, or conversely to book
for a part of that time only.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="location-accomodation"&gt;
&lt;h3&gt;Location &amp;amp; Accomodation&lt;/h3&gt;

&lt;p&gt;Leysin, Switzerland, &amp;quot;same place as before&amp;quot;.&lt;/p&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://4.bp.blogspot.com/-HQ8S2DcTato/WIc2XXEQP9I/AAAAAAAAAQw/7BNVgaMg-jcaMzVaAc2JD5sMgu-Xn5DeACLcB/s1600/chalet1_004.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://4.bp.blogspot.com/-HQ8S2DcTato/WIc2XXEQP9I/AAAAAAAAAQw/7BNVgaMg-jcaMzVaAc2JD5sMgu-Xn5DeACLcB/s320/chalet1_004.jpg" width="320" height="240" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;Let me refresh your
memory: both the sprint venue and the lodging will be in a
pair of chalets built specifically for bed &amp;amp; breakfast:
&lt;a class="reference external" href="http://www.ermina.ch/"&gt;http://www.ermina.ch/&lt;/a&gt;.  The place has a good ADSL Internet connection
with wireless installed.  You can also arrange your own lodging
elsewhere (as long as you are in Leysin, you cannot be more than a 15
minutes walk away from the sprint venue).&lt;/p&gt;
&lt;p&gt;Please &lt;em&gt;confirm&lt;/em&gt; that you are coming so that we can adjust the
reservations as appropriate.&lt;/p&gt;
&lt;p&gt;The options of rooms are a bit more limited than on previous years
because the place for bed-and-breakfast is shrinking; but we should
still have enough room for us.  The price is around 60 CHF, breakfast
included, in shared rooms (3 or 4 people).  If there are people that
would prefer a double or single room, please contact me and we'll see
what choices you have.  There are also a choice of hotels in Leysin.&lt;/p&gt;
&lt;p&gt;Please register by Mercurial:&lt;/p&gt;
&lt;blockquote&gt;
&lt;a href="https://bitbucket.org/pypy/extradoc/"&gt;https://bitbucket.org/pypy/extradoc/&lt;/a&gt;&lt;/br&gt;
&lt;a href="https://bitbucket.org/pypy/extradoc/raw/extradoc/sprintinfo/leysin-winter-2017/"&gt;https://bitbucket.org/pypy/extradoc/raw/extradoc/sprintinfo/leysin-winter-2017/&lt;/a&gt;&lt;/blockquote&gt;
&lt;p&gt;or on the pypy-dev mailing list if you do not yet have check-in rights:&lt;/p&gt;
&lt;blockquote&gt;
&lt;a class="reference external" href="http://mail.python.org/mailman/listinfo/pypy-dev"&gt;http://mail.python.org/mailman/listinfo/pypy-dev&lt;/a&gt;&lt;/blockquote&gt;
&lt;p&gt;You need a Swiss-to-(insert country here) power adapter.  There will be
some Swiss-to-EU adapters around, and at least one EU-format power strip.&lt;/p&gt;
&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/yMW1jnoLywU" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/3831779797804484935/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=3831779797804484935" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/3831779797804484935" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/3831779797804484935" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/yMW1jnoLywU/leysin-winter-sprint-2526th-feb-4th.html" title="Leysin Winter Sprint: 25/26th Feb. - 4th March 2017" /><author><name>Armin Rigo</name><uri>http://www.blogger.com/profile/06300515270104686574</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img1.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://4.bp.blogspot.com/-HQ8S2DcTato/WIc2XXEQP9I/AAAAAAAAAQw/7BNVgaMg-jcaMzVaAc2JD5sMgu-Xn5DeACLcB/s72-c/chalet1_004.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2017/01/leysin-winter-sprint-2526th-feb-4th.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-5671090852400583673</id><published>2016-11-12T17:32:00.000+01:00</published><updated>2016-11-13T10:32:48.066+01:00</updated><title type="text">PyPy2.7 v5.6 released - stdlib 2.7.12 support, C-API improvements, and more</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="document" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"&gt;
&lt;div itemprop="articleBody"&gt;
&lt;div class="section" id="pypy2-7-v5-6"&gt;
&lt;h1&gt;
&lt;/h1&gt;
We have released PyPy2.7 v5.6 [0], about two months after PyPy2.7 v5.4. This new PyPy2.7 release includes the upstream stdlib version 2.7.12.&lt;br /&gt;
&lt;br /&gt;
We continue to make incremental improvements to our C-API compatibility layer (cpyext). We pass all but 12 of the over-6000 tests in the upstream NumPy test suite, and have begun examining what it would take to support Pandas and PyQt. &lt;br /&gt;
&lt;br /&gt;
Work proceeds at a good pace on the PyPy3.5 version due to a &lt;a class="reference external" href="https://morepypy.blogspot.com/2016/08/pypy-gets-funding-from-mozilla-for.html"&gt;grant&lt;/a&gt; from the Mozilla Foundation, and some of those changes have been backported to PyPy2.7 where relevant.&lt;br /&gt;
&lt;br /&gt;
The PowerPC and s390x backend have been &lt;a class="reference external" href="https://morepypy.blogspot.co.at/2016/11/vectorization-extended-powerpc-and-s390x.html"&gt;enhanced&lt;/a&gt; with the capability to use SIMD instructions for &lt;span style="font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;"&gt;micronumpy&lt;/span&gt; loops.&lt;br /&gt;
&lt;br /&gt;
We changed &lt;span style="font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;"&gt;&lt;span style="font-size: small;"&gt;&lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;timeit&lt;/span&gt;&lt;/code&gt;&lt;/span&gt; &lt;/span&gt;to now report average +/- standard deviation, which is better than the misleading minimum value reported in CPython.&lt;br /&gt;
&lt;br /&gt;
We now support building PyPy with OpenSSL 1.1 in our built-in _ssl module, as well as maintaining support for previous versions.&lt;br /&gt;
&lt;br /&gt;
&lt;a class="reference external" href="https://cffi.readthedocs.io/en/latest/whatsnew.html"&gt;CFFI&lt;/a&gt; has been updated to 1.9, improving an already great package for interfacing with C.&lt;br /&gt;
&lt;br /&gt;
As always, this release fixed many issues and bugs raised by the growing community of PyPy users. We strongly recommend updating. You can download the PyPy2.7 v5.6 release here:&lt;br /&gt;
&lt;blockquote&gt;
&lt;div&gt;
&lt;a class="reference external" href="http://pypy.org/download.html"&gt;http://pypy.org/download.html&lt;/a&gt;&lt;/div&gt;
&lt;/blockquote&gt;
Downstream packagers have been hard at work. The Debian package is already available, and the &lt;a href="https://github.com/squeaky-pl/portable-pypy"&gt;portable PyPy&lt;/a&gt; versions are also ready, for those who wish to run PyPy on other Linux distributions like RHEL/Centos 5.&lt;br /&gt;
&lt;br /&gt;
We would like to thank our donors for the continued support of the PyPy project.&lt;br /&gt;
&lt;br /&gt;
We would also like to thank our contributors and encourage new people to join the project. PyPy has many layers and we need help with all of them: &lt;a class="reference external" href="http://doc.pypy.org/"&gt;PyPy&lt;/a&gt; and &lt;a class="reference external" href="https://rpython.readthedocs.org/"&gt;RPython&lt;/a&gt; documentation improvements, tweaking popular &lt;a class="reference external" href="http://doc.pypy.org/en/latest/project-ideas.html#make-more-python-modules-pypy-friendly"&gt;modules&lt;/a&gt; to run on pypy, or general &lt;a class="reference external" href="http://doc.pypy.org/en/latest/project-ideas.html"&gt;help&lt;/a&gt; with making RPython’s JIT even better.&lt;br /&gt;
&lt;div class="section" id="what-is-pypy"&gt;
&lt;h2 style="text-align: center;"&gt;
What is PyPy?&lt;/h2&gt;
PyPy is a very compliant Python interpreter, almost a drop-in replacement for CPython 2.7. It’s fast (&lt;a class="reference external" href="http://speed.pypy.org/"&gt;PyPy and CPython 2.7.x&lt;/a&gt; performance comparison) due to its integrated tracing JIT compiler.&lt;br /&gt;
We also welcome developers of other &lt;a class="reference external" href="http://pypyjs.org/"&gt;dynamic languages&lt;/a&gt; to see what RPython can do for them.&lt;br /&gt;
This release supports:&lt;br /&gt;
&lt;blockquote&gt;
&lt;div&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;b&gt;x86&lt;/b&gt; machines on most common operating systems (Linux 32/64 bits, Mac OS X 64 bits, Windows 32 bits, OpenBSD, FreeBSD)&lt;/li&gt;
&lt;li&gt;newer &lt;b&gt;ARM&lt;/b&gt; hardware (ARMv6 or ARMv7, with VFPv3) running Linux,&lt;/li&gt;
&lt;li&gt;big- and little-endian variants of &lt;b&gt;PPC64&lt;/b&gt; running Linux,&lt;/li&gt;
&lt;li&gt;&lt;b&gt;s390x&lt;/b&gt; running Linux&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class="section" id="other-highlights-since-5-4-released-aug-31-2016"&gt;
&lt;h2 style="text-align: center;"&gt;
What else is new?&lt;/h2&gt;
&lt;div style="text-align: left;"&gt;
(since the release of PyPy 5.4 in August, 2016)&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
There are many incremental improvements to RPython and PyPy, the complete listing is &lt;a href="http://pypy.readthedocs.io/en/latest/release-pypy2.7-v5.6.0.html"&gt;here.&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&amp;nbsp; &lt;/div&gt;
Please update, and continue to help us make PyPy better.&lt;br /&gt;
&lt;br /&gt;
Cheers, The PyPy team&lt;br /&gt;
&lt;br /&gt;
[0] We skipped 5.5 since we share a code base with PyPy3, and PyPy3.3-v.5.5-alpha was &lt;a href="https://morepypy.blogspot.co.il/2016/10/pypy3-550-released.html"&gt;released&lt;/a&gt; last month &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/wJd-WN_R8lA" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/5671090852400583673/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=5671090852400583673" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/5671090852400583673" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/5671090852400583673" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/wJd-WN_R8lA/pypy27-v56-released-stdlib-2712-support.html" title="PyPy2.7 v5.6 released - stdlib 2.7.12 support, C-API improvements, and more" /><author><name>mattip</name><uri>http://www.blogger.com/profile/07336549270776418081</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img1.blogblog.com/img/b16-rounded.gif" /></author><thr:total>5</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2016/11/pypy27-v56-released-stdlib-2712-support.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-4042433015460084057</id><published>2016-11-03T09:35:00.000+01:00</published><updated>2016-11-03T13:41:35.974+01:00</updated><title type="text">Vectorization extended. PowerPC and s390x</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
We are happy to announce that JIT support in both the PowerPC backend and the&lt;br /&gt;
s390x backend have been enhanced. Both can now vectorize loops via SIMD&lt;br /&gt;
instructions. Special thanks to IBM for funding this work.&lt;br /&gt;
&lt;br /&gt;
If you are not familiar with this topic you can read more details&amp;nbsp;&lt;a href="http://pypyvecopt.blogspot.co.at/"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
There are many more enhancements under the hood. Most notably, all pure operations are now delayed until the latest possible point. In some cases indices have been calculated more than once or they needed an additional register, because the old value is still used. Additionally it is now possible to load quadword-aligned memory in both PPC and s390x (x86 currently cannot do that).&lt;br /&gt;
&lt;h3&gt;
&lt;span style="font-size: large;"&gt;NumPy &amp;amp; CPyExt&lt;/span&gt;&lt;/h3&gt;
The community and core developers have been moving CPyExt towards a complete, but emulated, layer for CPython C extensions. This is great, because the one restriction preventing the wider deployment of PyPy in several scenarios will hopefully be removed. However, we advocate not to use CPyExt, but rather to not write C code at all (let PyPy speed up your Python code) or use &lt;a href="http://cffi.readthedocs.io/en/latest/"&gt;cffi&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The work done here to support vectorization helps&lt;i&gt; micronumpy &lt;/i&gt;(NumPyPy) to speed up operations for PPC and s390x. So why is PyPy supporting both NumPyPy and NumPy, do we actually need both? Yes, there are places where gcc can beat the JIT, and places where the tight integration between NumPyPy and PyPy is more performant. We do have plans to integrate both, hijacking the C-extension method calls to use NumPyPy where we know NumPyPy can be faster.&lt;br /&gt;
&lt;br /&gt;
Just to give you an idea why this is a benefit:&lt;br /&gt;
&lt;br /&gt;
NumPy arrays can carry custom dtypes and apply user defined python functions on the arrays. How could one optimize this kind of scenario? In a traditional setup, you cannot. But as soon as NumPyPy is turned on, you can suddenly JIT compile this code and vectorize it.&lt;br /&gt;
&lt;br /&gt;
Another example is element access that occurs frequently, or any other calls that cross between Python and the C level frequently.&lt;br /&gt;
&lt;h3&gt;
&lt;span style="font-size: large;"&gt;Benchmarks&lt;/span&gt;&lt;/h3&gt;
Let's have a look at some benchmarks reusing&amp;nbsp;&lt;a href="https://bitbucket.org/mikefc/numpy-benchmark/src" target="_blank"&gt;mikefc's numpy benchmark suite&lt;/a&gt;&amp;nbsp;(find the forked version &lt;a href="https://bitbucket.org/plan_rich/numpy-benchmark" target="_blank"&gt;here&lt;/a&gt;).&amp;nbsp;&lt;span style="white-space: pre-wrap;"&gt;I only ran a subset of microbenchmarks, showing that the core functionality is&lt;/span&gt;&lt;br /&gt;
&lt;span style="white-space: pre-wrap;"&gt;functioning properly. &lt;/span&gt;Additionally it has been rewritten to use&amp;nbsp;&lt;a href="https://perf.readthedocs.io/en/latest/"&gt;&lt;i&gt;perf&lt;/i&gt;&lt;/a&gt;&amp;nbsp;instead of the &lt;i&gt;timeit&lt;/i&gt; stdlib module.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span style="font-size: small;"&gt;Setup&lt;/span&gt;&lt;/h2&gt;
x86 runs on a Intel i7-2600 clocked at 3.40GHz using 4 cores. PowerPC runs on the Power 8 clocked at 3.425GHz providing 160 cores. Last but not least the mainframe machine clocked up to 4 GHz, but fully virtualized (as it is common for such machines). Note that PowerPC is a non private remote machine. It is used by many users and it is crowded with processes. It is hard to extract a stable benchmark there.&lt;br /&gt;
&lt;br /&gt;
x86 ran on Fedora 24 (kernel version of 4.8.4), PPC ran on Fedora 21 (kernel version 3.17.4) and s390x ran on Redhat Linux 7.2 (kernel version 3.10.0). Respectivley, numpy on cpython had openblas available on x86, no blas implementation were present on s390x and PPC provided blas and lapack.&lt;br /&gt;
&lt;br /&gt;
As you can see all machines run very different configurations. It does not make sense to compare across platforms, but rather implementations on the same platform.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://4.bp.blogspot.com/-SLgW88U0Bek/WBhPjeuohdI/AAAAAAAAAkY/c5VgHxLjVaoWHIqf6zj65eBQeAefv5HPgCK4B/s1600/vecopt-x86-sse4.png" imageanchor="1"&gt;&lt;img border="0" height="388" src="https://4.bp.blogspot.com/-SLgW88U0Bek/WBhPjeuohdI/AAAAAAAAAkY/c5VgHxLjVaoWHIqf6zj65eBQeAefv5HPgCK4B/s640/vecopt-x86-sse4.png" width="640" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://1.bp.blogspot.com/-z8V9bUPw_BY/WBhPoQvdZ2I/AAAAAAAAAkg/n5IoXwIRnIwaNvOcb8S4S7-Iw455_dFGgCK4B/s1600/vecopt-ppc64le.png" imageanchor="1"&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/-b8xDL8pO4q4/WBhPqZW0wRI/AAAAAAAAAko/ZRyZpD4GP9IF6fbT4ngUfWmEJcQ536uZQCK4B/s1600/vecopt-s390x.png" imageanchor="1"&gt;&lt;img border="0" height="390" src="https://4.bp.blogspot.com/-b8xDL8pO4q4/WBhPqZW0wRI/AAAAAAAAAko/ZRyZpD4GP9IF6fbT4ngUfWmEJcQ536uZQCK4B/s640/vecopt-s390x.png" width="640" /&gt;&lt;/a&gt;&lt;img border="0" height="396" src="https://1.bp.blogspot.com/-z8V9bUPw_BY/WBhPoQvdZ2I/AAAAAAAAAkg/n5IoXwIRnIwaNvOcb8S4S7-Iw455_dFGgCK4B/s640/vecopt-ppc64le.png" width="640" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Blue shows CPython 2.7.10+ available on that platform using the latest NumPy (1.11). Micro NumPy is used for PyPy. PyPy+ indicates that the vectorization optimization is turned on.&lt;br /&gt;
All bar charts show the median value of all runs (5 samples, 100 loops, 10 inner loops, for the operations on vectors (not matrices) the loops are set to 1000). PyPy additionally gets 3 extra executions to warmup the JIT.&lt;br /&gt;
&lt;br /&gt;
The comparison is really comparing speed of machine code. It compares the PyPy's JIT output vs GCC's output. It has little to do with the speed of the interpreter.&lt;br /&gt;
&lt;br /&gt;
Both new SIMD backends speedup the numeric kernels. Some times it is near to the speed of CPython, some times it is faster. The maximum parallelism very much depends on the extension emitted by the compiler. All three SIMD backends have the same vector register size (which is 128 bit). This means that all three behave similar but ppc and s390x gain more because they can load 128bit of memory from quadword aligned memory.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Future directions&lt;/h2&gt;
Python is achieving rapid adoption in data science. This is currently a trend emerging in Europe, and Python is already heavily used for data science in the USA many other places around the world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PyPy can make a valuable contribution for data scientists, helping them to rapidly write scientific programs in Python and run them at near native speed. If you happen to be in that situation, we are eager to hear you feedback or resolve your issues and also work together to improve the performance of your,&lt;br /&gt;
code. Just get in touch!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Richard Plangger (plan_rich) and the PyPy team&lt;/div&gt;
&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/_2jODzG3S-k" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/4042433015460084057/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=4042433015460084057" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/4042433015460084057" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/4042433015460084057" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/_2jODzG3S-k/vectorization-extended-powerpc-and-s390x.html" title="Vectorization extended. PowerPC and s390x" /><author><name>Richard Plangger</name><uri>https://plus.google.com/114742728940931060202</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-fzm2oAI4Fmk/AAAAAAAAAAI/AAAAAAAAAZM/8rpCwmkysf4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://4.bp.blogspot.com/-SLgW88U0Bek/WBhPjeuohdI/AAAAAAAAAkY/c5VgHxLjVaoWHIqf6zj65eBQeAefv5HPgCK4B/s72-c/vecopt-x86-sse4.png" height="72" width="72" /><thr:total>4</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2016/11/vectorization-extended-powerpc-and-s390x.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-8069558680221199646</id><published>2016-10-12T10:37:00.000+02:00</published><updated>2016-10-12T10:37:56.039+02:00</updated><title type="text">PyPy3 5.5.0 released</title><content type="html">We're pleased to announce the release of PyPy3 v5.5.0. Coming four months after PyPy3.3 v5.2, it improves compatibility with Python 3.3 (3.3.5). We strongly recommend updating from previous PyPy3 versions.&lt;br /&gt;
&lt;br /&gt;
We would like to thank all of the people who donated to the py3k proposal for supporting the work that went into this release.&lt;br /&gt;
&lt;br /&gt;
You can download the PyPy3.3 v5.5.0 release here:&amp;nbsp;&lt;a href="http://pypy.org/download.html#python-3-3-5-compatible-pypy3-3-v5-5"&gt;http://pypy.org/download.html&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Improved Python 3.3.5 support.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;os.get_terminal_size(), time.monotonic(), str.casefold()&amp;nbsp;&lt;/li&gt;
&lt;li&gt;faulthandler module&lt;/li&gt;
&lt;li&gt;There are still some missing features such as a PEP 393-like space efficient string representation and including performance regressions (e.g. issue #2305). The focus for this release has been updating to 3.3 compatibility. Windows is also not yet supported.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;i&gt;ensurepip&lt;/i&gt; is also included (it's only included in CPython 3 &amp;gt;= 3.4).&lt;/li&gt;
&lt;li&gt;Buffer interface improvements (numpy on top of cpyext)&lt;/li&gt;
&lt;li&gt;Several JIT improvements (force-virtual-state, residual calls)&lt;/li&gt;
&lt;li&gt;Search path for libpypy-c.so has changed (helps with cffi embedding on linux distributions)&lt;/li&gt;
&lt;li&gt;Improve the error message when the user forgot the "self" argument of a method&lt;/li&gt;
&lt;li&gt;Many more small improvements, please head over to our documentation for more information&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Towards Python 3.5&lt;/h3&gt;
&lt;div&gt;
&lt;div&gt;
We have started to work on Python 3.5, which is a version used by many software projects. It seems to get wide adoption. We are happy to be part of the&amp;nbsp;Mozilla Open Source Support (MOSS) initiative.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Nevertheless we want to give our users the chance to use PyPy in their Python 3 projects, thus we have prepared this release.&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;
What is PyPy?&lt;/h3&gt;
PyPy is a very compliant Python interpreter, almost a drop-in replacement for&amp;nbsp;CPython 2.7.10 and 3.3.5. It's fast due to its integrated tracing JIT&amp;nbsp;compiler.&lt;br /&gt;
&lt;span style="white-space: pre-wrap;"&gt;&lt;span style="font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt; We also welcome developers of other dynamic languages to see what RPython can do for them.&lt;br /&gt;
&lt;br /&gt;
This release supports:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;x86 machines on most common operating systems except Windows&amp;nbsp;&lt;/li&gt;
&lt;li&gt;newer ARM hardware (ARMv6 or ARMv7, with VFPv3) running Linux&amp;nbsp;&lt;/li&gt;
&lt;li&gt;big- and little-endian variants of PPC64 running Linux&amp;nbsp;&lt;/li&gt;
&lt;li&gt;s390x running Linux&lt;/li&gt;
&lt;/ul&gt;
Please try it out and let us know what you think. We welcome feedback, we know&lt;br /&gt;
you are using PyPy, please tell us about it!&lt;br /&gt;
&lt;br /&gt;
Cheers&lt;br /&gt;
&lt;br /&gt;
The PyPy Team&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/A_KbzP8lup0" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/8069558680221199646/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=8069558680221199646" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/8069558680221199646" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/8069558680221199646" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/A_KbzP8lup0/pypy3-550-released.html" title="PyPy3 5.5.0 released" /><author><name>Richard Plangger</name><uri>https://plus.google.com/114742728940931060202</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-fzm2oAI4Fmk/AAAAAAAAAAI/AAAAAAAAAZM/8rpCwmkysf4/s512-c/photo.jpg" /></author><thr:total>7</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2016/10/pypy3-550-released.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-6719768292347391304</id><published>2016-09-10T10:30:00.000+02:00</published><updated>2016-10-03T09:23:56.782+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="revdb" /><title type="text">RevDB released, v5.4.1</title><content type="html">&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;
The first beta version of &lt;a href="https://bitbucket.org/pypy/revdb/"&gt;RevDB&lt;/a&gt; is out!  &lt;a href="https://morepypy.blogspot.com/2016/07/reverse-debugging-for-python.html"&gt;Remember&lt;/a&gt; that RevDB is a reverse debugger for Python.  The idea is that it is a debugger that can run forward and backward in time, letting you more easily understand your subtle bug in your big Python program.&lt;/p&gt;

&lt;p&gt;
RevDB should work on almost any Python program.  Even if you are normally only using CPython, trying to reproduce the bug with RevDB is similar to trying to run the program on a regular PyPy---usually it just works, &lt;a href="http://pypy.org/compat.html"&gt;even if not quite always&lt;/a&gt;.

&lt;p&gt;
News from the alpha version in the &lt;a href="https://morepypy.blogspot.com/2016/07/reverse-debugging-for-python.html"&gt;previous blog post&lt;/a&gt; include notably support for:
&lt;ul&gt;
&lt;li&gt;Threads.
&lt;li&gt;CPyExt, the compatibility layer of PyPy that can run CPython C extension modules.
&lt;/ul&gt;
as well as many other improvements.&lt;/p&gt;

&lt;p&gt;
You need to build it yourself for now.  It is tested on 64-bit Linux.  32-bit Linux, OS/X, and other POSIX platforms should all either work out of the box or be just a few fixes away (contributions welcome).  Win32 support is a lot more involved but not impossible.&lt;/p&gt;

&lt;p&gt;
See &lt;a href="https://bitbucket.org/pypy/revdb/"&gt;https://bitbucket.org/pypy/revdb/&lt;/a&gt; for more information!&lt;/p&gt;

&lt;p&gt;Armin&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/j2O1XiyFWno" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/6719768292347391304/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=6719768292347391304" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/6719768292347391304" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/6719768292347391304" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/j2O1XiyFWno/revdb-released-v541.html" title="RevDB released, v5.4.1" /><author><name>Armin Rigo</name><uri>http://www.blogger.com/profile/06300515270104686574</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img1.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2016/09/revdb-released-v541.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-3217566297258542810</id><published>2016-09-07T09:51:00.000+02:00</published><updated>2016-09-07T09:51:24.607+02:00</updated><title type="text">PyPy 5.4.1 bugfix released</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
We have released a bugfix for PyPy2.7-v5.4.0, released last week, due to the following issues:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: left;"&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;Update list of contributors in documentation and LICENSE file, this was unfortunately left out of 5.4.0. My apologies to the new contributors&lt;/li&gt;
&lt;li&gt;Allow tests run with &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;-A&lt;/span&gt;&lt;/code&gt; to find &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;libm.so&lt;/span&gt;&lt;/code&gt; even if it is a script not a dynamically loadable file&lt;/li&gt;
&lt;li&gt;Bump &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;sys.setrecursionlimit()&lt;/span&gt;&lt;/code&gt; when translating PyPy, for translating with CPython&lt;/li&gt;
&lt;li&gt;Tweak a float comparison with 0 in &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;backendopt.inline&lt;/span&gt;&lt;/code&gt; to avoid rounding errors&lt;/li&gt;
&lt;li&gt;Fix for an issue for translating the sandbox&lt;/li&gt;
&lt;li&gt;Fix for and issue where &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;unicode.decode('utf8',&lt;/span&gt; &lt;span class="pre"&gt;'custom_replace')&lt;/span&gt;&lt;/code&gt; messed up the last byte of a unicode string sometimes&lt;/li&gt;
&lt;li&gt;Update built-in &lt;a class="reference external" href="https://cffi.readthedocs.io/"&gt;cffi&lt;/a&gt; to version 1.8.1&lt;/li&gt;
&lt;li&gt;Explicitly detect that we found as-yet-unsupported OpenSSL 1.1, and crash translation with a message asking for help porting it&lt;/li&gt;
&lt;li&gt;Fix a regression where a PyBytesObject was forced (converted to a RPython object) when not required, reported as issue #2395&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
Thanks to those who reported the issues.&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style="text-align: center;"&gt;
What is PyPy?&lt;/h3&gt;
&lt;div style="text-align: left;"&gt;
PyPy is a very compliant Python interpreter, almost a drop-in replacement for CPython 2.7. It's fast (&lt;a href="http://speed.pypy.org/"&gt;PyPy and CPython 2.7.x&lt;/a&gt; performance comparison) due to its integrated tracing JIT compiler.&lt;br /&gt;
&lt;br /&gt;
We also welcome developers of other &lt;a href="http://pypyjs.org/"&gt;dynamic languages&lt;/a&gt; to see what RPython can do for them.&lt;br /&gt;
&lt;br /&gt;
This release supports:&lt;/div&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;&lt;b&gt;x86&lt;/b&gt; machines on most common operating systems (Linux 32/64, Mac OS X 64, Windows 32, OpenBSD, FreeBSD),&lt;/li&gt;
&lt;li&gt;newer &lt;b&gt;ARM&lt;/b&gt; hardware (ARMv6 or ARMv7, with VFPv3) running Linux,&lt;/li&gt;
&lt;li&gt;big- and little-endian variants of &lt;b&gt;PPC64&lt;/b&gt; running Linux,&lt;/li&gt;
&lt;li&gt;&lt;b&gt;s390x&lt;/b&gt; running Linux&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="text-align: left;"&gt;
Please update, and continue to help us make PyPy better.&lt;br /&gt;
&lt;br /&gt;
Cheers&lt;br /&gt;
&lt;br /&gt;
The PyPy Team&lt;/div&gt;
&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/8ESr747XWcw" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/3217566297258542810/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=3217566297258542810" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/3217566297258542810" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/3217566297258542810" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/8ESr747XWcw/pypy-541-bugfix-released.html" title="PyPy 5.4.1 bugfix released" /><author><name>mattip</name><uri>http://www.blogger.com/profile/07336549270776418081</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img1.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2016/09/pypy-541-bugfix-released.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-3611318295736669599</id><published>2016-08-31T18:08:00.001+02:00</published><updated>2016-08-31T18:08:25.378+02:00</updated><title type="text">PyPy2 v5.4 released - incremental improvements and enhancements</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
We have released PyPy2.7 v5.4, a little under two months after PyPy2.7 v5.3.
This new PyPy2.7 release includes incremental improvements to our C-API
compatibility layer (cpyext), enabling us to pass over 99% of the upstream
numpy test suite.&lt;br /&gt;
&lt;br /&gt;
We updated built-in &lt;a class="reference external" href="https://cffi.readthedocs.org/"&gt;cffi&lt;/a&gt; support to version 1.8,
which now supports the “limited API” mode for c-extensions on
CPython &amp;gt;=3.2.&lt;br /&gt;

&lt;br /&gt;
We improved tooling for the PyPy &lt;a class="reference external" href="https://morepypy.blogspot.com.au/2016/08/pypy-tooling-upgrade-jitviewer-and.html"&gt;JIT&lt;/a&gt;, and expanded VMProf
support to OpenBSD and Dragon Fly BSD&lt;br /&gt;

&lt;br /&gt;
As always, this release fixed many issues and bugs raised by the
growing community of PyPy users. We strongly recommend updating.&lt;br /&gt;

&lt;br /&gt;
You can download the PyPy2 v5.4 release here:&lt;br /&gt;
&lt;blockquote&gt;
&lt;div&gt;
&lt;a class="reference external" href="http://pypy.org/download.html"&gt;http://pypy.org/download.html&lt;/a&gt;&lt;/div&gt;
&lt;/blockquote&gt;
We would like to thank our donors for their continued support of the PyPy
project. We would also like to thank our contributors and
encourage new people to join the project. PyPy has many
layers and we need help with all of them: &lt;a class="reference external" href="http://doc.pypy.org/"&gt;PyPy&lt;/a&gt; and &lt;a class="reference external" href="https://rpython.readthedocs.org/"&gt;RPython&lt;/a&gt; documentation
improvements, testing and adapting popular &lt;a class="reference external" href="http://doc.pypy.org/en/latest/project-ideas.html#make-more-python-modules-pypy-friendly"&gt;modules&lt;/a&gt; to run on PyPy, or general &lt;a class="reference external" href="http://doc.pypy.org/en/latest/project-ideas.html"&gt;help&lt;/a&gt;
with making RPython’s JIT even better.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="section" id="what-is-pypy"&gt;
&lt;h1 style="text-align: center;"&gt;
What is PyPy?&lt;/h1&gt;
PyPy is a very compliant Python interpreter, almost a drop-in replacement for CPython 2.7. It’s fast (&lt;a class="reference external" href="http://speed.pypy.org/"&gt;PyPy and CPython 2.7&lt;/a&gt; performance comparison) due to its integrated tracing JIT compiler.&lt;br /&gt;
&lt;br /&gt;
We also welcome developers of other &lt;a class="reference external" href="http://pypyjs.org/"&gt;dynamic languages&lt;/a&gt; to see what RPython can do for them.&lt;br /&gt;
&lt;br /&gt;
This release supports:&lt;br /&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;b&gt;x86&lt;/b&gt; machines on most common operating systems (Linux 32/64, Mac OS X 64, Windows 32, OpenBSD, FreeBSD)&lt;/li&gt;
&lt;li&gt;newer &lt;b&gt;ARM&lt;/b&gt; hardware (ARMv6 or ARMv7, with VFPv3) running Linux&lt;/li&gt;
&lt;li&gt;big- and little-endian variants of &lt;b&gt;PPC64&lt;/b&gt; running Linux&lt;/li&gt;
&lt;li&gt;&lt;b&gt;s390x&lt;/b&gt; running Linux&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h1 style="text-align: center;"&gt;
What is New?&lt;/h1&gt;
&lt;h3&gt;
(since the release of PyPy 5.3 in June, 2016)&lt;/h3&gt;
There are many incremental improvements to RPython and PyPy, the complete listing is &lt;a href="http://pypy.readthedocs.io/en/latest/release-pypy2.7-v5.4.0.html"&gt;here&lt;/a&gt;. Mozilla &lt;a href="https://morepypy.blogspot.com/2016/08/pypy-gets-funding-from-mozilla-for.html"&gt;generously sponsored&lt;/a&gt; work toward python 3.5 compatibility, and we are beginning to see some cross-over improvements of RPython and PyPy2.7 as a result.&lt;br /&gt;
&lt;br /&gt;
Please update, and continue to help us make PyPy better.
Cheers&lt;br /&gt;&lt;br /&gt;
The PyPy Team&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/vrbsptUOAr4" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/3611318295736669599/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=3611318295736669599" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/3611318295736669599" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/3611318295736669599" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/vrbsptUOAr4/pypy2-v54-released-incremental.html" title="PyPy2 v5.4 released - incremental improvements and enhancements" /><author><name>mattip</name><uri>http://www.blogger.com/profile/07336549270776418081</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img1.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2016/08/pypy2-v54-released-incremental.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-5107430577468391432</id><published>2016-08-11T12:52:00.000+02:00</published><updated>2016-08-11T22:51:50.921+02:00</updated><title type="text">PyPy Tooling Upgrade: JitViewer and VMProf</title><content type="html">We are happy to announce a major JitViewer (JV) update.&lt;br /&gt;
JV allows you to inspect RPython's internal compiler representation (the language in which PyPy is implemented) including the generated machine code of your program. It can graphically show you details of the JIT compiled code and helps you pinpoint issues in your program.&lt;br /&gt;
&lt;br /&gt;
VMProf is a statistical CPU profiler for python imposing very little overhead at runtime.&lt;br /&gt;
&lt;br /&gt;
Both VMProf and JitViewer share a common goal: Present useful information for your python program.&lt;br /&gt;
The combination of both can reveal more information than either alone.&lt;br /&gt;
That is the reason why they are now both packaged together.&lt;br /&gt;
We also updated &lt;a href="http://vmprof.com/" target="_blank"&gt;vmprof.com&lt;/a&gt;&amp;nbsp;with various bug fixes and changes including an all new interface to JV.&lt;br /&gt;
&lt;br /&gt;
This work was done with the goal of improving tooling and libraries around the Python/PyPy/RPython ecosystem.&lt;br /&gt;
Some of the tools we have developed:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;CFFI&lt;/b&gt; - Foreign Function Interface that avoids CPyExt (&lt;a href="http://cffi.readthedocs.io/en/latest/" target="_blank"&gt;CFFI docs&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;RevDB &lt;/b&gt;- A reverse debugger for python (&lt;a href="https://morepypy.blogspot.co.at/2016/07/reverse-debugging-for-python.html" target="_blank"&gt;RevDB blog post&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
and of course the tools we discuss here:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;VMProf&lt;/b&gt; - A statistical CPU profiler (&lt;a href="http://vmprof.readthedocs.io/en/latest/" target="_blank"&gt;VMProf docs&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;JitViewer&lt;/b&gt; - Visualization of the log file produced by RPython (&lt;a href="http://vmprof.readthedocs.io/en/latest/"&gt;JitLog docs&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h3&gt;
A "brand new" JitViewer&lt;/h3&gt;
&lt;br /&gt;
JitViewer has two pieces: you create a log file when running your program, and then use a graphic tool to view what happened.&lt;br /&gt;
&lt;br /&gt;
The old logging format was a hard-to-maintain, plain-text-logging facility. Frequent changes often broke internal tools.&lt;br /&gt;
Additionally, the logging output of a long running program required a lot of disk space.&lt;br /&gt;
&lt;br /&gt;
Our new binary format encodes data densely, makes use of some compression (gzip), and tries to remove repetition where possible.&lt;br /&gt;
It also supports versioning for future proofing and can be extended easily.&lt;br /&gt;
&lt;br /&gt;
And *drumroll* you no longer need to install a tool to view the log yourself&lt;br /&gt;
anymore! The whole system moved to vmprof.com and you can use it any time.&lt;br /&gt;
&lt;br /&gt;
Sounds great. But what can you do with it? Here are two examples for a PyPy user:&lt;br /&gt;
&lt;h3&gt;
&lt;br /&gt;PyPy crashed? Did you discover a bug?&lt;/h3&gt;
&lt;br /&gt;
For some hard to find bugs it is often necessary to look at the compiled code. The old&lt;br /&gt;
procedure often required you to upload a plain text file which was hard to parse and to look through.&lt;br /&gt;
&lt;br /&gt;
A better way to share a crash report is to install the ``vmprof`` module from PyPi and execute either of the two commands:&lt;br /&gt;
&lt;span style="font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="color: #a64d79; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;"&gt;# this program does not crash, but has some weird behaviour&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #0b5394; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;"&gt;$ pypy -m jitlog --web &amp;lt;your program args&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;"&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;"&gt;PyPy Jitlog: http://vmprof.com/#/&amp;lt;hash&amp;gt;/traces&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #a64d79; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;"&gt;# this program segfaults&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #0b5394; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;"&gt;$ pypy -m jitlog -o /tmp/log &amp;lt;your program args&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #0b5394; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;"&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;"&gt;&amp;lt;Segfault&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #0b5394; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;"&gt;$ pypy -m jitlog --upload /tmp/log&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;"&gt;PyPy Jitlog: http://vmprof.com/#/&amp;lt;hash&amp;gt;/traces&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Providing the link in the bug report allows PyPy developers to browse and identify potential issues.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Speed issues&lt;/h3&gt;
&lt;br /&gt;
VMProf is a great tool to find hot spots that consume a lot of time in your program. As soon as you have identified code that runs slowly, you can switch to jitlog and maybe pinpoint certain aspects that do not behave as expected. You will find an overview, and are able to browse the generated code. If you cannot make sense of all that, you can just share the link with us and we can have a look too.&lt;br /&gt;
&lt;h3&gt;
&lt;br /&gt;Future direction&lt;/h3&gt;
&lt;br /&gt;
We hope that the new release will help both PyPy developers and PyPy users resolve potential issues and easily point them out.&lt;br /&gt;
&lt;br /&gt;
Here are a few ideas what might come in the next few releases:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&amp;nbsp;Combination of CPU profiles and the JITLOG (sadly did not make it into the current release).&lt;/li&gt;
&lt;li&gt;Extend vmprof.com to be able to query vmprof/jitlog. &lt;br /&gt;An example query for vmprof: 'methods.callsites() &amp;gt; 5' and&lt;br /&gt;for the jitlog would be 'traces.contains('call_assembler').hasbridge('*my_func_name*')'.&lt;/li&gt;
&lt;li&gt;Extend the jitlog to capture the information of the optimization stage.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
Richard Plangger (plan_rich) and the PyPy team&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/pTVIyystLXw" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/5107430577468391432/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=5107430577468391432" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/5107430577468391432" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/5107430577468391432" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/pTVIyystLXw/pypy-tooling-upgrade-jitviewer-and.html" title="PyPy Tooling Upgrade: JitViewer and VMProf" /><author><name>Richard Plangger</name><uri>https://plus.google.com/114742728940931060202</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-fzm2oAI4Fmk/AAAAAAAAAAI/AAAAAAAAAZM/8rpCwmkysf4/s512-c/photo.jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2016/08/pypy-tooling-upgrade-jitviewer-and.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-5569307998787871200</id><published>2016-08-09T17:38:00.000+02:00</published><updated>2016-08-10T18:08:36.155+02:00</updated><title type="text">PyPy gets funding from Mozilla for Python 3.5 support</title><content type="html">&lt;p&gt;"Python 2.x versus Python 3.x": this is by now an old question.  In the eyes of some people Python 2 is here to stay, and in the eyes of others Python has long been 3 only.&lt;/p&gt;

&lt;p&gt;PyPy's own position is that PyPy will support Python 2.7 forever---the RPython language in which PyPy is written is a subset of  2.7, and we have no plan to upgrade that.  But at the same time, we want to support 3.x.  This is particularly true now: a relatively recent development is that Python 3.5 seems to attract more and more people.  The "switch" to Python 3.x might be starting to happen.&lt;/p&gt;

&lt;p&gt;Correspondingly, PyPy has been searching for a while for a way to support a larger-scale development effort.  The goal is to support not just any old version of Python 3.x, but Python 3.5, as this seems to be the version that people are switching to.  PyPy is close to supporting all of Python 3.3 now; but the list of what is new in Python &lt;a href="https://docs.python.org/3/whatsnew/3.4.html"&gt;3.4&lt;/a&gt; and &lt;a href="https://docs.python.org/3/whatsnew/3.5.html"&gt;3.5&lt;/a&gt; is far, far longer than anyone imagines.  The long-term goal is also to get a version of "PyPy3" that is as good as "PyPy2" is, including its performance and its cpyext layer (CPython C API interoperability), for example.&lt;/p&gt;

&lt;p&gt;So, the end result: &lt;a href="https://blog.mozilla.org/blog/2016/08/04/mozilla-awards-585000-to-nine-open-source-projects-in-q2-2016/"&gt;Mozilla recently decided to award $200,000&lt;/a&gt; to &lt;a href="http://baroquesoftware.com/"&gt;Baroque Software&lt;/a&gt; to work on PyPy as part of its Mozilla Open Source Support (MOSS) initiative.  This money will be used to implement the Python 3.5 features in PyPy. Within the next year, we plan to use the money to pay four core PyPy developers half-time to work on the missing features and on some of the big performance and cpyext issues. This should speed up the progress of catching up with Python 3.x significantly. We are extremely thankful to Mozilla for supporting us in this way, and will keep you updated on the progress via this blog.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/uTWeNBbKaCw" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/5569307998787871200/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=5569307998787871200" title="24 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/5569307998787871200" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/5569307998787871200" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/uTWeNBbKaCw/pypy-gets-funding-from-mozilla-for.html" title="PyPy gets funding from Mozilla for Python 3.5 support" /><author><name>Armin Rigo</name><uri>http://www.blogger.com/profile/06300515270104686574</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img1.blogblog.com/img/b16-rounded.gif" /></author><thr:total>24</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2016/08/pypy-gets-funding-from-mozilla-for.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-8854823774141612670</id><published>2016-07-08T12:39:00.001+02:00</published><updated>2016-10-03T09:23:45.050+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="revdb" /><title type="text">Reverse debugging for Python</title><content type="html">&lt;div class="section" id="revpdb"&gt;
&lt;h3&gt;RevPDB&lt;/h3&gt;
&lt;p&gt;A &amp;quot;reverse debugger&amp;quot; is a debugger where you can go forward and
backward in time.  It is an uncommon feature, at least in the open
source world, but I have no idea why.  I have used &lt;a class="reference external" href="http://undo.io/"&gt;undodb-gdb&lt;/a&gt; and
&lt;a class="reference external" href="http://rr-project.org/"&gt;rr&lt;/a&gt;, which are reverse debuggers for C code, and I can only say that
they saved me many, many days of poking around blindly in gdb.&lt;/p&gt;
&lt;p&gt;The PyPy team is pleased to give you &amp;quot;RevPDB&amp;quot;, a reverse-debugger
similar to &lt;tt class="docutils literal"&gt;rr&lt;/tt&gt; but for Python.&lt;/p&gt;
&lt;p&gt;An example is worth a thousand words.  Let's say your big Python
program has a bug that shows up inconsistently.  You have nailed it
down to something like:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;start &lt;tt class="docutils literal"&gt;x.py&lt;/tt&gt;, which does stuff (maybe involving processing files,
answering some web requests that you simulate from another terminal,
etc.);&lt;/li&gt;
&lt;li&gt;sometimes, after a few minutes, your program's state becomes
inconsistent and you get a failing assert or another exception.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is the case where RevPDB is useful.&lt;/p&gt;
&lt;p&gt;RevPDB is available only on 64-bit Linux and OS/X right now, but should
not be too hard to port to other OSes.  It is very much &lt;em&gt;alpha-level!&lt;/em&gt;
(It is a debugger full of bugs.  Sorry about that.)  I believe it is
still useful---it helped me in one &lt;a class="reference external" href="https://bitbucket.org/pypy/pypy/commits/bd220c268bc9"&gt;real use case&lt;/a&gt; already.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="how-to-get-revpdb"&gt;
&lt;h3&gt;How to get RevPDB&lt;/h3&gt;
&lt;p&gt;The following demo was done with an alpha version for 64-bit Linux,
compiled for Arch Linux.  I won't provide the binary; it should be
easy enough to retranslate (much faster than a regular PyPy because it
contains neither a JIT nor a custom GC).  Grab the &lt;a class="reference external" href="http://pypy.org/download.html#building-from-source"&gt;PyPy sources&lt;/a&gt; from
Mercurial, and then:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
hg update reverse-debugger
# or &amp;quot;hg update ff376ccacb36&amp;quot; for exactly this demo
cd pypy/goal
../../rpython/bin/rpython -O2 --revdb targetpypystandalone.py  \
                  --withoutmod-cpyext --withoutmod-micronumpy
&lt;/pre&gt;
&lt;p&gt;and possibly rename the final &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;pypy-c&lt;/span&gt;&lt;/tt&gt; to &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;pypy-revdb&lt;/span&gt;&lt;/tt&gt; to avoid
confusion.&lt;/p&gt;
&lt;p&gt;Other platforms than 64-bit Linux and OS/X need some fixes before they work.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="demo"&gt;
&lt;h3&gt;Demo&lt;/h3&gt;
&lt;p&gt;For this demo, we're going to use this &lt;tt class="docutils literal"&gt;x.py&lt;/tt&gt; as the &amp;quot;big program&amp;quot;:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
import os

class Foo(object):
    value = 5

lst1 = [Foo() for i in range(100)]
lst1[50].value += 1
for x in lst1:
    x.value += 1

for x in lst1:
    if x.value != 6:
        print 'oops!'
        os._exit(1)
&lt;/pre&gt;
&lt;p&gt;Of course, it is clear what occurs in this small example: the check
fails on item 50.  For this demo, the check has been written with
&lt;tt class="docutils literal"&gt;os._exit(1)&lt;/tt&gt;, because this exits immediately the program.  If it
was written with an &lt;tt class="docutils literal"&gt;assert&lt;/tt&gt;, then its failure would execute things
in the &lt;tt class="docutils literal"&gt;traceback&lt;/tt&gt; module afterwards, to print the traceback; it
would be a minor mess just to find the exact point of the failing
&lt;tt class="docutils literal"&gt;assert&lt;/tt&gt;.  (This and other issues are supposed to be fixed in the
future, but for now it is alpha-level.)&lt;/p&gt;
&lt;p&gt;Anyway, with a regular &lt;tt class="docutils literal"&gt;assert&lt;/tt&gt; and a regular post-mortem &lt;tt class="docutils literal"&gt;pdb&lt;/tt&gt;,
we could observe that &lt;tt class="docutils literal"&gt;x.value&lt;/tt&gt; is indeed 7 instead of 6 when the
assert fails.  Imagine that the program is much bigger: how would we
find the exact chain of events that caused this value 7 to show up on
this particular &lt;tt class="docutils literal"&gt;Foo&lt;/tt&gt; object?  This is what RevPDB is for.&lt;/p&gt;
&lt;p&gt;&lt;strike&gt;First, we need for now to disable Address Space Layout Randomization
(ASLR), otherwise replaying will not work.  This is done once with the
following command line, which changes the state until the next
reboot:&lt;/strike&gt;&lt;/p&gt;
&lt;pre class="literal-block"&gt;
echo 0 | sudo tee /proc/sys/kernel/randomize_va_space
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; the above is no longer necessary from revision ff376ccacb36.&lt;/p&gt;
&lt;p&gt;Run &lt;tt class="docutils literal"&gt;x.py&lt;/tt&gt; with RevPDB's version of PyPy instead of the regular
interpreter (CPython or PyPy):&lt;/p&gt;
&lt;pre class="literal-block"&gt;
PYPYRDB=log.rdb ./pypy-revdb x.py
&lt;/pre&gt;
&lt;p&gt;This &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;pypy-revdb&lt;/span&gt;&lt;/tt&gt; executable is like a slow PyPy executable, running
(for now) without a JIT.  This produces a file &lt;tt class="docutils literal"&gt;log.rdb&lt;/tt&gt; which
contains a complete log of this execution.  (If the bug we are
tracking occurs rarely, we need to re-run it several times until we
get the failure.  But once we got the failure, then we're done with
this step.)&lt;/p&gt;
&lt;p&gt;Start:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
rpython/translator/revdb/revdb.py log.rdb
&lt;/pre&gt;
&lt;p&gt;We get a pdb-style debugger.  This &lt;tt class="docutils literal"&gt;revdb.py&lt;/tt&gt; is a normal Python
program, which you run with an unmodified Python; internally, it looks
inside the log for the path to &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;pypy-revdb&lt;/span&gt;&lt;/tt&gt; and run it as needed (as
one forking subprocess, in a special mode).&lt;/p&gt;
&lt;p&gt;Initially, we are at the start of the program---not at the end, like
we'd get in a regular debugger:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
File &amp;quot;&amp;lt;builtin&amp;gt;/app_main.py&amp;quot;, line 787 in setup_bootstrap_path:
(1)$
&lt;/pre&gt;
&lt;p&gt;The list of commands is available with &lt;tt class="docutils literal"&gt;help&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Go to the end with &lt;tt class="docutils literal"&gt;continue&lt;/tt&gt; (or &lt;tt class="docutils literal"&gt;c&lt;/tt&gt;):&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(1)$ continue
File &amp;quot;/tmp/x.py&amp;quot;, line 14 in &amp;lt;module&amp;gt;:
...
  lst1 = [Foo() for i in range(100)]
  lst1[50].value += 1
  for x in lst1:
      x.value += 1

  for x in lst1:
      if x.value != 6:
          print 'oops!'
&amp;gt;         os._exit(1)
(19727)$
&lt;/pre&gt;
&lt;p&gt;We are now at the beginning of the last executed line.  The number
19727 is the &amp;quot;time&amp;quot;, measured in number of lines executed.  We can go
backward with the &lt;tt class="docutils literal"&gt;bstep&lt;/tt&gt; command (backward step, or &lt;tt class="docutils literal"&gt;bs&lt;/tt&gt;), line
by line, and forward again with the &lt;tt class="docutils literal"&gt;step&lt;/tt&gt; command.  There are also
commands &lt;tt class="docutils literal"&gt;bnext&lt;/tt&gt;, &lt;tt class="docutils literal"&gt;bcontinue&lt;/tt&gt; and &lt;tt class="docutils literal"&gt;bfinish&lt;/tt&gt; and their forward
equivalents.  There is also &amp;quot;&lt;tt class="docutils literal"&gt;go TIME&lt;/tt&gt;&amp;quot; to jump directly to the specified
time.  (Right now the debugger only stops at &amp;quot;line start&amp;quot;
events, not at function entry or exit, which makes some cases a bit
surprising: for example, a &lt;tt class="docutils literal"&gt;step&lt;/tt&gt; from the return statement of
function &lt;tt class="docutils literal"&gt;foo()&lt;/tt&gt; will jump directly to the caller's caller, if the
caller's current line was &lt;tt class="docutils literal"&gt;return foo() + 2&lt;/tt&gt;, because no &amp;quot;line
start&amp;quot; event occurs in the caller after &lt;tt class="docutils literal"&gt;foo()&lt;/tt&gt; returns to it.)&lt;/p&gt;
&lt;p&gt;We can print Python expressions and statements using the &lt;tt class="docutils literal"&gt;p&lt;/tt&gt;
command:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(19727)$ p x
$0 = &amp;lt;__main__.Foo object at 0xfffffffffffeab3e&amp;gt;
(19727)$ p x.value
$1 = 7
(19727)$ p x.value + 1
8
&lt;/pre&gt;
&lt;p&gt;The &amp;quot;&lt;tt class="docutils literal"&gt;$NUM =&lt;/tt&gt;&amp;quot; prefix is only shown when we print an object that
really exists in the debugged program; that's why the last line does
not contain it.  Once a &lt;tt class="docutils literal"&gt;$NUM&lt;/tt&gt; has been printed, then we can use
it in further expressions---even at a different point time.  It
becomes an anchor that always refers to the same object:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(19727)$ bstep

File &amp;quot;/tmp/x.py&amp;quot;, line 13 in &amp;lt;module&amp;gt;:
...

  lst1 = [Foo() for i in range(100)]
  lst1[50].value += 1
  for x in lst1:
      x.value += 1

  for x in lst1:
      if x.value != 6:
&amp;gt;         print 'oops!'
          os._exit(1)
(19726)$ p $0.value
$1 = 7
&lt;/pre&gt;
&lt;p&gt;In this case, we want to know when this value 7 was put in this
attribute.  This is the job of a watchpoint:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(19726)$ watch $0.value
Watchpoint 1 added
updating watchpoint value: $0.value =&amp;gt; 7
&lt;/pre&gt;
&lt;p&gt;This watchpoint means that &lt;tt class="docutils literal"&gt;$0.value&lt;/tt&gt; will be evaluated at each line.
When the &lt;tt class="docutils literal"&gt;repr()&lt;/tt&gt; of this expression changes, the watchpoint activates
and execution stops:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(19726)$ bcontinue
[searching 19629..19726]
[searching 19338..19629]

updating watchpoint value: $0.value =&amp;gt; 6
Reverse-hit watchpoint 1: $0.value
File &amp;quot;/tmp/x.py&amp;quot;, line 9 in &amp;lt;module&amp;gt;:
  import os

  class Foo(object):
      value = 5

  lst1 = [Foo() for i in range(100)]
  lst1[50].value += 1
  for x in lst1:
&amp;gt;     x.value += 1

  for x in lst1:
      if x.value != 6:
          print 'oops!'
          os._exit(1)
(19524)$
&lt;/pre&gt;
&lt;p&gt;Note that using the &lt;tt class="docutils literal"&gt;$NUM&lt;/tt&gt; syntax is essential in watchpoints.  You
can't say &amp;quot;&lt;tt class="docutils literal"&gt;watch x.value&lt;/tt&gt;&amp;quot;, because the variable &lt;tt class="docutils literal"&gt;x&lt;/tt&gt; will go out
of scope very soon when we move forward or backward in time.  In fact
the watchpoint expression is always evaluated inside an environment
that contains the builtins but not the current locals and globals.
But it also contains all the &lt;tt class="docutils literal"&gt;$NUM&lt;/tt&gt;, which can be used to refer to
known objects.  It is thus common to watch &lt;tt class="docutils literal"&gt;$0.attribute&lt;/tt&gt; if &lt;tt class="docutils literal"&gt;$0&lt;/tt&gt;
is an object, or to watch &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;len($1)&lt;/span&gt;&lt;/tt&gt; if &lt;tt class="docutils literal"&gt;$1&lt;/tt&gt; is some list.  The
watch expression can also be a simple boolean: for example, &amp;quot;&lt;tt class="docutils literal"&gt;watch
$2 in $3&lt;/tt&gt;&amp;quot; where &lt;tt class="docutils literal"&gt;$3&lt;/tt&gt; is some dict and &lt;tt class="docutils literal"&gt;$2&lt;/tt&gt; is some object that
you find now in the dict; you would use this to find out the time when
&lt;tt class="docutils literal"&gt;$2&lt;/tt&gt; was put inside &lt;tt class="docutils literal"&gt;$3&lt;/tt&gt;, or removed from it.&lt;/p&gt;
&lt;p&gt;Use &amp;quot;&lt;tt class="docutils literal"&gt;info watchpoints&lt;/tt&gt;&amp;quot; and &amp;quot;&lt;tt class="docutils literal"&gt;delete &amp;lt;watchpointnum&amp;gt;&lt;/tt&gt;&amp;quot; to manage
watchpoints.&lt;/p&gt;
&lt;p&gt;There are also regular breakpoints, which you set with &amp;quot;&lt;tt class="docutils literal"&gt;b
FUNCNAME&lt;/tt&gt;&amp;quot;.  It breaks whenever there is a call to a function that
happens to have the given name.  (It might be annoying to use for a
function like &lt;tt class="docutils literal"&gt;__init__()&lt;/tt&gt; which has many homonyms.  There is no
support for breaking on a fully-qualified name or at a given line
number for now.)&lt;/p&gt;
&lt;p&gt;In our demo, we stop at the line &lt;tt class="docutils literal"&gt;x.value += 1&lt;/tt&gt;, which is where the
value was changed from 6 to 7.  Use &lt;tt class="docutils literal"&gt;bcontinue&lt;/tt&gt; again to stop at the
line &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;lst1[50].value&lt;/span&gt; += 1&lt;/tt&gt;, which is where the value was changed from
5 to 6.  Now we know how this &lt;tt class="docutils literal"&gt;value&lt;/tt&gt; attribute ends up being 7.&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(19524)$ bcontinue
[searching 19427..19524]
[searching 19136..19427]

updating watchpoint value: $0.value =&amp;gt; 5
Reverse-hit watchpoint 1: $0.value
File &amp;quot;/tmp/x.py&amp;quot;, line 7 in &amp;lt;module&amp;gt;:
  import os

  class Foo(object):
      value = 5

  lst1 = [Foo() for i in range(100)]
&amp;gt; lst1[50].value += 1
  for x in lst1:
      x.value += 1

  for x in lst1:
      if x.value != 6:
...
(19422)$
&lt;/pre&gt;
&lt;p&gt;Try to use &lt;tt class="docutils literal"&gt;bcontinue&lt;/tt&gt; yet another time.  It will stop now just before
&lt;tt class="docutils literal"&gt;$0&lt;/tt&gt; is created.  At that point in time, &lt;tt class="docutils literal"&gt;$0&lt;/tt&gt; refers to
an object that does not exist yet, so the watchpoint now evaluates to
an error message (but it continues to work as before, with that error
message as the string it currently evaluates to).&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(19422)$ bcontinue
[searching 19325..19422]

updating watchpoint value: $0.value =&amp;gt; RuntimeError:
               '$0' refers to an object created later in time
Reverse-hit watchpoint 1: $0.value
File &amp;quot;/tmp/x.py&amp;quot;, line 6 in &amp;lt;module&amp;gt;:
  import os

  class Foo(object):
      value = 5

&amp;gt; lst1 = [Foo() for i in range(100)]
  lst1[50].value += 1
  for x in lst1:
      x.value += 1

  for x in lst1:
...
(19371)$
&lt;/pre&gt;
&lt;p&gt;In big programs, the workflow is similar, just more complex.  Usually
it works this way: we find interesting points in time with some
combination of watchpoints and some direct commands to move around.
We write down on a piece of (real or virtual) paper these points in
history, including most importantly their time, so that we can
construct an ordered understanding of what is going on.&lt;/p&gt;
&lt;p&gt;The current &lt;tt class="docutils literal"&gt;revdb&lt;/tt&gt; can be annoying and sometimes even crash; but
the history you reconstruct can be kept.  All the times and
expressions printed are still valid when you restart &lt;tt class="docutils literal"&gt;revdb&lt;/tt&gt;.  The
only thing &amp;quot;lost&amp;quot; is the &lt;tt class="docutils literal"&gt;$NUM&lt;/tt&gt; objects, which you need to print
again.  (Maybe instead of &lt;tt class="docutils literal"&gt;$0&lt;/tt&gt;, &lt;tt class="docutils literal"&gt;$1&lt;/tt&gt;, ...  we should use &lt;tt class="docutils literal"&gt;$&amp;lt;big
number&amp;gt;&lt;/tt&gt;, where the big number identifies uniquely the object by its
creation time.  These numbers would continue to be valid even after
&lt;tt class="docutils literal"&gt;revdb&lt;/tt&gt; is restarted.  They are more annoying to use than just
&lt;tt class="docutils literal"&gt;$0&lt;/tt&gt; though.)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Screencast:&lt;/b&gt; Here's a (slightly typo-y) screencast of cfbolz using the reverse debugger:
&lt;script type="text/javascript" src="https://asciinema.org/a/3072e1za429f8gjeuoj0sfoqy.js" id="asciicast-3072e1za429f8gjeuoj0sfoqy" async&gt;&lt;/script&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="current-issues"&gt;
&lt;h3&gt;Current issues&lt;/h3&gt;
&lt;p&gt;General issues:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;If you are using &lt;tt class="docutils literal"&gt;revdb&lt;/tt&gt; on a log that took more than a few
minutes to record, then it can be painfully slow.  This is because
&lt;tt class="docutils literal"&gt;revdb&lt;/tt&gt; needs to replay again big parts of the log for some
operations.&lt;/li&gt;
&lt;li&gt;The &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;pypy-revdb&lt;/span&gt;&lt;/tt&gt; is currently missing the following modules:&lt;ul&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;thread&lt;/tt&gt; (implementing multithreading is possible, but not done
yet);&lt;/li&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;cpyext&lt;/tt&gt; (the CPython C API compatibility layer);&lt;/li&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;micronumpy&lt;/tt&gt; (minor issue only);&lt;/li&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;_continuation&lt;/tt&gt; (for greenlets).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Does not contain a JIT, and does not use our fast garbage
collectors.  You can expect &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;pypy-revdb&lt;/span&gt;&lt;/tt&gt; to be maybe 3 times
slower than CPython.&lt;/li&gt;
&lt;li&gt;Only works on Linux and OS/X.  There is no fundamental reason for
this restriction, but it is some work to fix.&lt;/li&gt;
&lt;li&gt;Replaying a program uses a &lt;em&gt;lot&lt;/em&gt; more memory; maybe 15x as much than
during the recording.  This is because it creates many forks.  If
you have a program that consumes 10% of your RAM or more, you will
need to reduce &lt;tt class="docutils literal"&gt;MAX_SUBPROCESSES&lt;/tt&gt; in &lt;tt class="docutils literal"&gt;process.py&lt;/tt&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Replaying also comes with a bunch of user interface issues:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;Attempted to do I/O or access raw memory&lt;/tt&gt;: we get this whenever
trying to &lt;tt class="docutils literal"&gt;print&lt;/tt&gt; some expression that cannot be evaluated with
only the GC memory---or which can, but then the &lt;tt class="docutils literal"&gt;__repr__()&lt;/tt&gt;
method of the result cannot.  We need to reset the state with
&lt;tt class="docutils literal"&gt;bstep&lt;/tt&gt; + &lt;tt class="docutils literal"&gt;step&lt;/tt&gt; before we can print anything else.  However,
if only the &lt;tt class="docutils literal"&gt;__repr__()&lt;/tt&gt; crashes, you still see the &lt;tt class="docutils literal"&gt;$NUM =&lt;/tt&gt;
prefix, and you can use that &lt;tt class="docutils literal"&gt;$NUM&lt;/tt&gt; afterwards.&lt;/li&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;id()&lt;/tt&gt; is globally unique, returning a reproducible 64-bit number,
so sometimes using &lt;tt class="docutils literal"&gt;id(x)&lt;/tt&gt; is a workaround for when using &lt;tt class="docutils literal"&gt;x&lt;/tt&gt;
doesn't work because of &lt;tt class="docutils literal"&gt;Attempted to do I/O&lt;/tt&gt; issues (e.g.  &lt;tt class="docutils literal"&gt;p
[id(x) for x in somelist]&lt;/tt&gt;).&lt;/li&gt;
&lt;li&gt;as explained in the demo, next/bnext/finish/bfinish might jump
around a bit non-predictably.&lt;/li&gt;
&lt;li&gt;similarly, breaks on watchpoints can stop at apparently unexpected
places (when going backward, try to do &amp;quot;step&amp;quot; once).  The issue is
that it can only stop at the beginning of every line.  In the
extreme example, if a line is &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;foo(somelist.pop(getindex()))&lt;/span&gt;&lt;/tt&gt;,
then &lt;tt class="docutils literal"&gt;somelist&lt;/tt&gt; is modified in the middle.  Immediately before
this modification occurs, we are in &lt;tt class="docutils literal"&gt;getindex()&lt;/tt&gt;, and
immediately afterwards we are in &lt;tt class="docutils literal"&gt;foo()&lt;/tt&gt;.  The watchpoint will
stop the program at the end of &lt;tt class="docutils literal"&gt;getindex()&lt;/tt&gt; if running backward,
and at the start of &lt;tt class="docutils literal"&gt;foo()&lt;/tt&gt; if running forward, but never
actually on the line doing the change.&lt;/li&gt;
&lt;li&gt;watchpoint expressions &lt;em&gt;must not&lt;/em&gt; have any side-effect at all.  If
they do, the replaying will get out of sync and &lt;tt class="docutils literal"&gt;revdb.py&lt;/tt&gt; will
complain about that.  Regular &lt;tt class="docutils literal"&gt;p&lt;/tt&gt; expressions and statements can
have side-effects; these effects are discarded as soon as you move
in time again.&lt;/li&gt;
&lt;li&gt;sometimes even &amp;quot;&lt;tt class="docutils literal"&gt;p import foo&lt;/tt&gt;&amp;quot; will fail with &lt;tt class="docutils literal"&gt;Attempted to do
I/O&lt;/tt&gt;.  Use instead &amp;quot;&lt;tt class="docutils literal"&gt;p import sys; foo = &lt;span class="pre"&gt;sys.modules['foo']&lt;/span&gt;&lt;/tt&gt;&amp;quot;.&lt;/li&gt;
&lt;li&gt;use &lt;tt class="docutils literal"&gt;help&lt;/tt&gt; to see all commands.  &lt;tt class="docutils literal"&gt;backtrace&lt;/tt&gt; can be useful.
There is no &lt;tt class="docutils literal"&gt;up&lt;/tt&gt; command; you have to move in time instead,
e.g. using &lt;tt class="docutils literal"&gt;bfinish&lt;/tt&gt; to go back to the point where the current
function was called.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="how-revpdb-is-done"&gt;
&lt;h3&gt;How RevPDB is done&lt;/h3&gt;
&lt;p&gt;If I had to pick the main advantage of PyPy over CPython, it is that
we have got with the RPython translation toolchain a real place for
experimentation.  Every now and then, we build inside RPython some
feature that gives us an optionally tweaked version of the PyPy
interpreter---tweaked in a way that would be hard to do with CPython,
because it would require systematic changes everywhere.  The most
obvious and successful examples are the GC and the JIT.  But there
have been many other experiments along the same lines, from the
so-called &lt;a class="reference external" href="https://bitbucket.org/pypy/extradoc/raw/tip/eu-report/D07.1_Massive_Parallelism_and_Translation_Aspects-2007-02-28.pdf"&gt;stackless transformation&lt;/a&gt; in the early days, to the STM
version of PyPy.&lt;/p&gt;
&lt;p&gt;RevPDB works in a similar way.  It is a version of PyPy in which some
operations are systematically replaced with other operations.&lt;/p&gt;
&lt;p&gt;To keep the log file at a reasonable size, we duplicate the content of
all GC objects during replaying---by repeating the same actions on
them, without writing anything in the log file.  So that means that in
the &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;pypy-revdb&lt;/span&gt;&lt;/tt&gt; binary, the operations that do arithmetic or
read/write GC-managed memory are not modified.  Most operations are
like that.  However, the other operations, the ones that involve
either non-GC memory or calls to external C functions, are tweaked.
Each of these operations is replaced with code that works in two
modes, based on a global flag:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;in &amp;quot;recording&amp;quot; mode, we log the result of the operation (but not the
arguments);&lt;/li&gt;
&lt;li&gt;in &amp;quot;replaying&amp;quot; mode, we don't really do the operation at all, but
instead just fetch the result from the log.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Hopefully, all remaining unmodified operations (arithmetic and GC
load/store) are completely deterministic.  So during replaying, every
integer or non-GC pointer variable will have exactly the same value as
it had during recording.  Interestingly, it means that if the
recording process had a big array in non-GC memory, then in the
replaying process, the array is not allocated at all; it is just
represented by the same address, but there is nothing there.  When we
record &amp;quot;read item 123 from the array&amp;quot;, we record the result of the
read (but not the &amp;quot;123&amp;quot;).  When we replay, we're seeing again the same
&amp;quot;read item 123 from the array&amp;quot; operation.  At that point, we don't
read anything; we just return the result from the log.  Similarly,
when recording a &amp;quot;write&amp;quot; to the array, we record nothing (this write
operation has no result); so that when replaying, we redo nothing.&lt;/p&gt;
&lt;p&gt;Note how that differs from anything managed by GC memory: GC objects
(including GC arrays) are really allocated, writes really occur, and
reads are redone.  We don't touch the log in this case.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="other-reverse-debuggers-for-python"&gt;
&lt;h3&gt;Other reverse debuggers for Python&lt;/h3&gt;
&lt;p&gt;There are already some Python experiments about &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Debugger#Reverse_debugging"&gt;reverse debugging&lt;/a&gt;.
This is also known as &amp;quot;omniscient debugging&amp;quot;.  However, I claim that
the result they get to is not very useful (for the purpose presented
here).  How they work is typically by recording changes to some
objects, like lists and dictionaries, in addition to recording the
history of where your program passed through.  However, the problem of
Python is that lists and dictionaries are not the end of the story.
There are many, many, many types of objects written in C which are
mutable---in fact, the immutable ones are the exception.  You can try
to systematically record all changes, but it is a huge task and easy
to forget a detail.&lt;/p&gt;
&lt;p&gt;In other words it is a typical use case for tweaking the RPython
translation toolchain, rather than tweaking the CPython (or PyPy)
interpreter directly.  The result that we get here with RevPDB is more
similar to &lt;a class="reference external" href="http://rr-project.org/"&gt;rr&lt;/a&gt; anyway, in that only a relatively small number of
external events are recorded---not every single change to every single
list and dictionary.&lt;/p&gt;
&lt;p&gt;Some links:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;epdb: &lt;a class="reference external" href="https://github.com/native-human/epdb"&gt;https://github.com/native-human/epdb&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;pode: &lt;a class="reference external" href="https://github.com/rodsenra/pode"&gt;https://github.com/rodsenra/pode&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For C:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;rr: &lt;a class="reference external" href="http://rr-project.org/"&gt;http://rr-project.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;undodb-gdb: &lt;a class="reference external" href="http://undo.io/"&gt;http://undo.io/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="future-work"&gt;
&lt;h3&gt;Future work&lt;/h3&gt;
&lt;p&gt;As mentioned above, it is alpha-level, and only works on Linux and OS/X.
So the plans for the immediate future are to fix the various
issues described above, and port to more operating systems.  The core of the system
is in the C file and headers in &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;rpython/translator/revdb/src-revdb&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;For interested people, there is also the &lt;a class="reference external" href="https://bitbucket.org/pypy/duhton/"&gt;Duhton&lt;/a&gt; interpreter and its
&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;reverse-debugger&lt;/span&gt;&lt;/tt&gt; branch, which is where I prototyped the RPython
concept before moving to PyPy.  The basics should work for any
interpreter written in RPython, but they require some specific code to
interface with the language; in the case of PyPy, it is in
&lt;tt class="docutils literal"&gt;pypy/interpreter/reverse_debugging.py&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;In parallel, there are various user interface improvements that people
could be interested in, like a more &amp;quot;pdb++&amp;quot; experience.  (And the script
at &lt;tt class="docutils literal"&gt;rpython/translator/revdb/revdb.py&lt;/tt&gt; should be moved out into some
more &amp;quot;official&amp;quot; place, and the &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;reverse-debugger&lt;/span&gt;&lt;/tt&gt; branch should be
merged back to default.)&lt;/p&gt;
&lt;p&gt;I would certainly welcome any help!&lt;/p&gt;
&lt;p&gt;-+- Armin&lt;/p&gt;
&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/hEARFKZvdTQ" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/8854823774141612670/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=8854823774141612670" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/8854823774141612670" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/8854823774141612670" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/hEARFKZvdTQ/reverse-debugging-for-python.html" title="Reverse debugging for Python" /><author><name>Armin Rigo</name><uri>http://www.blogger.com/profile/06300515270104686574</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img1.blogblog.com/img/b16-rounded.gif" /></author><thr:total>5</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2016/07/reverse-debugging-for-python.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-7708576047190172431</id><published>2016-06-08T19:45:00.002+02:00</published><updated>2016-06-08T19:45:45.451+02:00</updated><title type="text">PyPy2 v5.3 released - major C-extension support improvements</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
We have released PyPy2.7 v5.3, about six weeks after PyPy 5.1 and a week after
&lt;a class="reference external" href="http://morepypy.blogspot.com/2016/05/pypy33-v52-alpha-1-released.html"&gt;PyPy3.3 v5.2 alpha 1&lt;/a&gt;, the first PyPy release targeting 3.3
compatibility. This new PyPy2.7 release includes major improvements for the
C-API compatibility layer. In addition to complete support
for &lt;b&gt;lxml&lt;/b&gt;, we now pass most (more than 95%) of the upstream &lt;b&gt;numpy&lt;/b&gt; test suite. We can build and run &lt;b&gt;scipy&lt;/b&gt; and &lt;b&gt;matplotlib&lt;/b&gt; as well. Most of the failures have to do with (ab) use of the C-API, for instance writing to a read-only pointer obtained from &lt;span style="font-family: Verdana,sans-serif;"&gt;PyString_AsString()&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
Note that the C-API compatibility layer is significantly slower than CPython, as explained in the &lt;a href="http://morepypy.blogspot.com/2016/02/c-api-support-update.html"&gt;blog post&lt;/a&gt; about the new strategy for reflection of C objects into the PyPy interpreter.&lt;br /&gt;
&lt;br /&gt;
We updated &lt;a class="reference external" href="https://cffi.readthedocs.org/"&gt;cffi&lt;/a&gt; to version 1.7 (incremental changes which provide a nicer developer experience, documented &lt;a class="reference external" href="http://cffi.readthedocs.io/en/latest/whatsnew.html"&gt;here&lt;/a&gt;). We would encourage developers to move their C-extension modules to cffi, but are willing to help you work through issues with existing code; come to #pypy on IRC and let us know how we can help you help us do better.&lt;br /&gt;
&lt;br /&gt;
You can download the PyPy2 v5.3 release here:&lt;br /&gt;

&lt;blockquote&gt;
&lt;div&gt;
&lt;a class="reference external" href="http://pypy.org/download.html"&gt;http://pypy.org/download.html&lt;/a&gt;&lt;/div&gt;
&lt;/blockquote&gt;
We would like to thank our donors for their continued support of the PyPy
project. We would also like to thank our contributors and
encourage new people to join the project. PyPy has many
layers and we need help with all of them: &lt;a class="reference external" href="http://doc.pypy.org/"&gt;PyPy&lt;/a&gt; and &lt;a class="reference external" href="https://rpython.readthedocs.org/"&gt;RPython&lt;/a&gt; documentation
improvements, tweaking popular &lt;a class="reference external" href="http://doc.pypy.org/en/latest/project-ideas.html#make-more-python-modules-pypy-friendly"&gt;modules&lt;/a&gt; to run on PyPy, or general &lt;a class="reference external" href="http://doc.pypy.org/en/latest/project-ideas.html"&gt;help&lt;/a&gt;
with making RPython’s JIT even better.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="section" id="what-is-pypy"&gt;
&lt;h1 style="text-align: center;"&gt;
What is PyPy?&lt;/h1&gt;
PyPy is a very compliant Python interpreter, almost a drop-in replacement for CPython 2.7. It’s fast (&lt;a class="reference external" href="http://speed.pypy.org/"&gt;PyPy and CPython 2.7&lt;/a&gt; performance comparison) due to its integrated tracing JIT compiler.&lt;br /&gt;
&lt;br /&gt;
We also welcome developers of other &lt;a class="reference external" href="http://pypyjs.org/"&gt;dynamic languages&lt;/a&gt; to see what RPython can do for them.&lt;br /&gt;
&lt;br /&gt;
This release supports:&lt;br /&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;b&gt;x86&lt;/b&gt; machines on most common operating systems (Linux 32/64, Mac OS X 64, Windows 32, OpenBSD, FreeBSD)&lt;/li&gt;
&lt;li&gt;newer &lt;b&gt;ARM&lt;/b&gt; hardware (ARMv6 or ARMv7, with VFPv3) running Linux&lt;/li&gt;
&lt;li&gt;big- and little-endian variants of &lt;b&gt;PPC64&lt;/b&gt; running Linux&lt;/li&gt;
&lt;li&gt;&lt;b&gt;s390x&lt;/b&gt; running Linux&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h1 style="text-align: center;"&gt;
Other Highlights&lt;/h1&gt;
&lt;h3&gt;
(since the release of PyPy 5.1 in April, 2016)&lt;/h3&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;&lt;div class="first"&gt;
&lt;b&gt;New features:&lt;/b&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;div class="first"&gt;
Merge a major expansion of the C-API support in cpyext, also expand cpyext tests to allow running them after translation as well as untranslated&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class="first"&gt;
Instead of “GIL not held when a CPython C extension module
calls PyXxx”, we now silently acquire/release the GIL.  Helps with
C extension modules that call some PyXxx() functions without
holding the GIL (arguably, they are theoretically buggy).&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class="first"&gt;
Support command line -v to trace import statements&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class="first"&gt;
Revive traceviewer, a tool to use pygame to view traces&lt;/div&gt;
&lt;div class="first"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class="first"&gt;
&lt;b&gt;&lt;a class="reference external" href="https://bitbucket.org/pypy/numpy"&gt;Numpy&lt;/a&gt; via our internal _numpypy module:&lt;/b&gt;&lt;/div&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Implement ufunc.outer&lt;/li&gt;
&lt;li&gt;Move PyPy-specific numpypy headers to a subdirectory (also changed &lt;a class="reference external" href="https://bitbucket.org/pypy/numpy"&gt;the repo&lt;/a&gt;
accordingly)&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;div class="first"&gt;
&lt;b&gt;Performance improvements:&lt;/b&gt;&lt;/div&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Use bitstrings to compress lists of descriptors that are attached to an
EffectInfo&lt;/li&gt;
&lt;li&gt;Remove most of the _ovf, _zer and _val operations from RPython.  Kills
quite some code internally, and allows the JIT to do better
optimizations: for example, app-level code like &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;x&lt;/span&gt; &lt;span class="pre"&gt;/&lt;/span&gt; &lt;span class="pre"&gt;2&lt;/span&gt;&lt;/code&gt; or &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;x&lt;/span&gt; &lt;span class="pre"&gt;%&lt;/span&gt; &lt;span class="pre"&gt;2&lt;/span&gt;&lt;/code&gt;
can now be turned into &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;x&lt;/span&gt; &lt;span class="pre"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="pre"&gt;1&lt;/span&gt;&lt;/code&gt; or &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;x&lt;/span&gt; &lt;span class="pre"&gt;&amp;amp;&lt;/span&gt; &lt;span class="pre"&gt;1&lt;/span&gt;&lt;/code&gt;, even if x is possibly
negative.&lt;/li&gt;
&lt;li&gt;Rework the way registers are moved/spilled in before_call()&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class="first"&gt;
&lt;b&gt;Internal refactorings:&lt;/b&gt;&lt;/div&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Refactor code to better support Python3-compatible syntax&lt;/li&gt;
&lt;li&gt;Reduce the size of generated C sources during translation by
eliminating many many unused struct declarations (Issue #2281)&lt;/li&gt;
&lt;li&gt;Reduce the size of generated code by using the same function objects in
all generated subclasses&lt;/li&gt;
&lt;li&gt;Share cpyext Py* function wrappers according to the signature, shrinking the
translated libpypy.so by about 10% (without the JIT)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
Please update, and continue to help us make PyPy better.
Cheers&lt;br /&gt;

The PyPy Team&lt;br /&gt;
&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/N-uk-kawdt8" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/7708576047190172431/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=7708576047190172431" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/7708576047190172431" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/7708576047190172431" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/N-uk-kawdt8/pypy2-v53-released-major-c-extension.html" title="PyPy2 v5.3 released - major C-extension support improvements" /><author><name>mattip</name><uri>http://www.blogger.com/profile/07336549270776418081</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img1.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2016/06/pypy2-v53-released-major-c-extension.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-1725927506363370346</id><published>2016-05-30T23:53:00.001+02:00</published><updated>2016-05-31T19:41:52.593+02:00</updated><title type="text">PyPy3.3 v5.2 alpha 1 released</title><content type="html">&lt;p&gt;We're pleased to announce the first alpha release of PyPy3.3 v5.2. This is the&lt;br /&gt;
first release of PyPy which targets Python 3.3 (3.3.5) compatibility.&lt;/p&gt;&lt;p&gt;We would like to thank all of the people who &lt;a class="reference external" href="http://morepypy.blogspot.com/2012/01/py3k-and-numpy-first-stage-thanks-to.html"&gt;donated&lt;/a&gt; to the &lt;a class="reference external" href="http://pypy.org/py3donate.html"&gt;py3k proposal&lt;/a&gt;&lt;br /&gt;
for supporting the work that went into this and future releases.&lt;/p&gt;&lt;p&gt;You can download the PyPy3.3 v5.2 alpha 1 release here:&lt;/p&gt;&lt;blockquote&gt;&lt;a class="reference external" href="http://pypy.org/download.html#python-3-3-5-compatible-pypy3-3-v5-2"&gt;http://pypy.org/download.html#python-3-3-5-compatible-pypy3-3-v5-2&lt;/a&gt;&lt;/blockquote&gt;&lt;div class="section" id="highlights"&gt;&lt;h1&gt;Highlights&lt;/h1&gt;&lt;ul class="simple"&gt;&lt;li&gt;Python 3.3.5 support!&lt;ul&gt;&lt;li&gt;Being an early alpha release, there are some &lt;a class="reference external" href="https://bitbucket.org/pypy/pypy/issues?status=new&amp;amp;status=open&amp;amp;component=PyPy3+%28running+Python+3.x%29&amp;amp;kind=enhancement"&gt;missing features&lt;/a&gt; such as a&lt;br /&gt;
&lt;a class="reference external" href="https://bitbucket.org/pypy/pypy/issues/2309/optimized-unicode-representation"&gt;PEP 393-like space efficient string representation&lt;/a&gt; and &lt;a class="reference external" href="https://bitbucket.org/pypy/pypy/issues?status=new&amp;amp;status=open&amp;amp;component=PyPy3%20%28running%20Python%203.x%29"&gt;known issues&lt;/a&gt;&lt;br /&gt;
including performance issues (e.g. issue &lt;a class="reference external" href="https://bitbucket.org/pypy/pypy/issues/2305"&gt;#2305&lt;/a&gt;). The focus for this&lt;br /&gt;
release has been updating to 3.3 compatibility. Windows is also not yet&lt;br /&gt;
supported.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://docs.python.org/3/library/ensurepip.html#module-ensurepip"&gt;ensurepip&lt;/a&gt; is also included (it's only included in CPython 3 &amp;gt;= 3.4).&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div class="section" id="what-is-pypy"&gt;&lt;h1&gt;What is PyPy?&lt;/h1&gt;&lt;p&gt;PyPy is a very compliant Python interpreter, almost a drop-in replacement for&lt;br /&gt;
CPython 2.7.10 and one day 3.3.5. It's fast due to its integrated tracing JIT&lt;br /&gt;
compiler.&lt;/p&gt;&lt;p&gt;We also welcome developers of other &lt;a class="reference external" href="http://pypyjs.org"&gt;dynamic languages&lt;/a&gt; to see what RPython&lt;br /&gt;
can do for them.&lt;/p&gt;&lt;p&gt;This release supports:&lt;/p&gt;&lt;blockquote&gt;&lt;ul class="simple"&gt;&lt;li&gt;&lt;strong&gt;x86&lt;/strong&gt; machines on most common operating systems except Windows&lt;br /&gt;
(Linux 32/64, Mac OS X 64, OpenBSD, FreeBSD),&lt;/li&gt;
&lt;li&gt;newer &lt;strong&gt;ARM&lt;/strong&gt; hardware (ARMv6 or ARMv7, with VFPv3) running Linux,&lt;/li&gt;
&lt;li&gt;big- and little-endian variants of &lt;strong&gt;PPC64&lt;/strong&gt; running Linux,&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;s390x&lt;/strong&gt; running Linux&lt;/li&gt;
&lt;/ul&gt;&lt;/blockquote&gt;&lt;p&gt;Please try it out and let us know what you think. We welcome feedback, we know&lt;br /&gt;
you are using PyPy, please tell us about it!&lt;/p&gt;&lt;p&gt;We'd especially like to thank these people for their contributions to this&lt;br /&gt;
release:&lt;/p&gt;&lt;p&gt;Manuel Jacob, Ronan Lamy, Mark Young, Amaury Forgeot d'Arc, Philip Jenvey,&lt;br /&gt;
Martin Matusiak, Vasily Kuznetsov, Matti Picus, Armin Rigo and many others.&lt;/p&gt;&lt;p&gt;Cheers&lt;/p&gt;&lt;p&gt;The PyPy Team&lt;/p&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/LrYx7drQZ0o" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/1725927506363370346/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=1725927506363370346" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/1725927506363370346" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/1725927506363370346" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/LrYx7drQZ0o/pypy33-v52-alpha-1-released.html" title="PyPy3.3 v5.2 alpha 1 released" /><author><name>Philip Jenvey</name><uri>http://www.blogger.com/profile/09838979615980113137</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/-CswaMc6ImG4/UcCpmhjSm9I/AAAAAAAAABc/IQwct2xVWwU/s220/Phil%2B%2540%2BLa%2BScala2.jpg" /></author><thr:total>8</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2016/05/pypy33-v52-alpha-1-released.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-7586640750680293200</id><published>2016-05-03T18:18:00.000+02:00</published><updated>2016-05-03T18:18:51.457+02:00</updated><title type="text">PyPy 5.1.1 bugfix released</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div style="text-align: left;"&gt;
We have released a bugfix for PyPy 5.1, due to a &lt;a href="https://bitbucket.org/pypy/pypy/issues/2282"&gt;regression&lt;/a&gt; in installing third-party packages depending on numpy (using our numpy fork available at https://bitbucket.org/pypy/numpy ).&lt;br /&gt;&lt;br /&gt;Thanks to those who reported the issue. We also fixed a regression in translating PyPy which increased the memory required to translate. Improvement will be noticed by downstream packagers and those who translate rather than&lt;br /&gt;download pre-built binaries.&lt;br /&gt;&lt;/div&gt;
&lt;h3 style="text-align: center;"&gt;
What is PyPy?&lt;/h3&gt;
&lt;div style="text-align: left;"&gt;
PyPy is a very compliant Python interpreter, almost a drop-in replacement for CPython 2.7. It's fast (&lt;a href="http://speed.pypy.org/"&gt;PyPy and CPython 2.7.x&lt;/a&gt; performance comparison) due to its integrated tracing JIT compiler.&lt;br /&gt;&lt;br /&gt;We also welcome developers of other &lt;a href="http://pypyjs.org/"&gt;dynamic languages&lt;/a&gt; to see what RPython can do for them.&lt;br /&gt;&lt;br /&gt;This release supports:&lt;/div&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;&lt;b&gt;x86&lt;/b&gt; machines on most common operating systems (Linux 32/64, Mac OS X 64, Windows 32, OpenBSD, FreeBSD),&lt;/li&gt;
&lt;li&gt;newer &lt;b&gt;ARM&lt;/b&gt; hardware (ARMv6 or ARMv7, with VFPv3) running Linux,&lt;/li&gt;
&lt;li&gt;big- and little-endian variants of &lt;b&gt;PPC64&lt;/b&gt; running Linux,&lt;/li&gt;
&lt;li&gt;&lt;b&gt;s390x&lt;/b&gt; running Linux&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="text-align: left;"&gt;
Please update, and continue to help us make PyPy better.&lt;br /&gt;&lt;br /&gt;Cheers&lt;br /&gt;&lt;br /&gt;The PyPy Team&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/HtCQxCle-s8" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/7586640750680293200/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=7586640750680293200" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/7586640750680293200" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/7586640750680293200" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/HtCQxCle-s8/pypy-511-bugfix-released.html" title="PyPy 5.1.1 bugfix released" /><author><name>mattip</name><uri>http://www.blogger.com/profile/07336549270776418081</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img1.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2016/05/pypy-511-bugfix-released.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-4979856639628970409</id><published>2016-04-20T22:04:00.000+02:00</published><updated>2016-04-20T22:10:33.516+02:00</updated><title type="text">PyPy 5.1 released</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
We have released PyPy 5.1, about a month after PyPy 5.0.&lt;br /&gt;
&lt;br /&gt;
This release includes more improvement to warmup time and memory requirements, extending the work done on PyPy 5.0. We have seen an additional reduction of about 20% in memory requirements, and up to 30% warmup time improvement, more detail in the &lt;a class="reference external" href="http://morepypy.blogspot.com/2016/04/warmup-improvements-more-efficient.html"&gt;blog post&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
We also now have &lt;a class="reference external" href="http://morepypy.blogspot.com/2016/04/pypy-enterprise-edition.html"&gt;full support for the IBM s390x&lt;/a&gt;. Since this support is in &lt;a class="reference external" href="https://rpython.readthedocs.org/"&gt;RPython&lt;/a&gt;, any dynamic language written using RPython, like PyPy, will automagically be supported on that architecture.&lt;br /&gt;
&lt;br /&gt;
We updated &lt;a class="reference external" href="https://cffi.readthedocs.org/"&gt;cffi&lt;/a&gt; to 1.6 (cffi 1.6 itself will be released shortly), and continue to improve support for the wider python ecosystem using the PyPy interpreter.&lt;br /&gt;
&lt;br /&gt;
You can download the PyPy 5.1 release here:&lt;br /&gt;
&lt;blockquote&gt;
&lt;div&gt;
&lt;a class="reference external" href="http://pypy.org/download.html"&gt;http://pypy.org/download.html&lt;/a&gt;&lt;/div&gt;
&lt;/blockquote&gt;
We would like to thank our donors for the continued support of the PyPy project.&lt;br /&gt;
We would also like to thank our contributors and encourage new people to join the project. PyPy has many layers and we need help with all of them: &lt;a class="reference external" href="http://doc.pypy.org/"&gt;PyPy&lt;/a&gt; and &lt;a class="reference external" href="https://rpython.readthedocs.org/"&gt;RPython&lt;/a&gt; documentation improvements, tweaking popular &lt;a class="reference external" href="http://doc.pypy.org/en/latest/project-ideas.html#make-more-python-modules-pypy-friendly"&gt;modules&lt;/a&gt; to run on pypy, or general &lt;a class="reference external" href="http://doc.pypy.org/en/latest/project-ideas.html"&gt;help&lt;/a&gt; with making RPython’s JIT even better.&lt;br /&gt;
&lt;div class="section" id="what-is-pypy"&gt;
&lt;h1 style="text-align: center;"&gt;
What is PyPy?&lt;/h1&gt;
PyPy is a very compliant Python interpreter, almost a drop-in replacement for CPython 2.7. It’s fast (&lt;a class="reference external" href="http://speed.pypy.org/"&gt;PyPy and CPython 2.7.x&lt;/a&gt; performance comparison) due to its integrated tracing JIT compiler.&lt;br /&gt;
&lt;br /&gt;
We also welcome developers of other &lt;a class="reference external" href="http://pypyjs.org/"&gt;dynamic languages&lt;/a&gt; to see what RPython can do for them.&lt;br /&gt;
&lt;br /&gt;
This release supports:&lt;br /&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;b&gt;x86&lt;/b&gt; machines on most common operating systems (Linux 32/64, Mac OS X 64, Windows 32, OpenBSD, FreeBSD),&lt;/li&gt;
&lt;li&gt;newer &lt;b&gt;ARM&lt;/b&gt; hardware (ARMv6 or ARMv7, with VFPv3) running Linux,&lt;/li&gt;
&lt;li&gt;big- and little-endian variants of &lt;b&gt;PPC64&lt;/b&gt; running Linux,&lt;/li&gt;
&lt;li&gt;&lt;b&gt;s390x&lt;/b&gt; running Linux&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="section" id="other-highlights-since-5-0-released-in-march-2015"&gt;
&lt;h1 style="text-align: center;"&gt;
Other Highlights&lt;/h1&gt;
&lt;h3&gt;
(since the release of PyPy 5.0 in March, 2016&lt;/h3&gt;
&lt;br /&gt;
&lt;ul class="simple" style="text-align: left;"&gt;
&lt;li&gt;&lt;h4&gt;
New features:&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;A new jit backend for the IBM s390x, which was a large effort over the past few months.&lt;/li&gt;
&lt;li&gt;Add better support for PyUnicodeObject in the C-API compatibility layer&lt;/li&gt;
&lt;li&gt;Support GNU/kFreeBSD Debian ports in vmprof&lt;/li&gt;
&lt;li&gt;Add __pypy__._promote&lt;/li&gt;
&lt;li&gt;Make attrgetter a single type for CPython compatibility&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h4&gt;
Bug Fixes&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Catch exceptions raised in an exit function&lt;/li&gt;
&lt;li&gt;Fix a corner case in the JIT&lt;/li&gt;
&lt;li&gt;Fix edge cases in the cpyext refcounting-compatible semantics (more work on cpyext compatibility is coming in the &lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;"&gt;&lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;cpyext-ext&lt;/span&gt;&lt;/code&gt; &lt;/span&gt;&lt;/span&gt;branch, but isn’t ready yet)&lt;/li&gt;
&lt;li&gt;Try harder to not emit NEON instructions on ARM processors without NEON support&lt;/li&gt;
&lt;li&gt;Improve the rpython posix module system interaction function calls&lt;/li&gt;
&lt;li&gt;Detect a missing class function implementation instead of calling a random function&lt;/li&gt;
&lt;li&gt;Check that PyTupleObjects do not contain any NULLs at the point of conversion to W_TupleObjects&lt;/li&gt;
&lt;li&gt;In ctypes, fix _anonymous_ fields of instances&lt;/li&gt;
&lt;li&gt;Fix JIT issue with unpack() on a Trace which contains half-written operations&lt;/li&gt;
&lt;li&gt;Fix sandbox startup (a regression in 5.0)&lt;/li&gt;
&lt;li&gt;Fix possible segfault for classes with mangled mro or __metaclass__&lt;/li&gt;
&lt;li&gt;Fix isinstance(deque(), Hashable) on the pure python deque&lt;/li&gt;
&lt;li&gt;Fix an issue with forkpty()&lt;/li&gt;
&lt;li&gt;Issues reported with our previous release were &lt;a class="reference external" href="http://doc.pypy.org/en/latest/whatsnew-5.1.0.html"&gt;resolved&lt;/a&gt; after reports from users on our issue tracker at &lt;a class="reference external" href="https://bitbucket.org/pypy/pypy/issues"&gt;https://bitbucket.org/pypy/pypy/issues&lt;/a&gt; or on IRC at #pypy&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h4&gt;
&lt;a class="reference external" href="https://bitbucket.org/pypy/numpy"&gt;Numpy&lt;/a&gt;:&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Implemented numpy.where for a single argument&lt;/li&gt;
&lt;li&gt;Indexing by a numpy scalar now returns a scalar&lt;/li&gt;
&lt;li&gt;Fix transpose(arg) when arg is a sequence&lt;/li&gt;
&lt;li&gt;Refactor include file handling, now all numpy ndarray, ufunc, and umath functions exported from libpypy.so are declared in pypy_numpy.h, which is included only when building our fork of numpy&lt;/li&gt;
&lt;li&gt;Add broadcast&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h4&gt;
Performance improvements:&lt;/h4&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Improve str.endswith([tuple]) and str.startswith([tuple]) to allow JITting&lt;/li&gt;
&lt;li&gt;Merge another round of improvements to the warmup performance&lt;/li&gt;
&lt;li&gt;Cleanup history rewriting in pyjitpl&lt;/li&gt;
&lt;li&gt;Remove the forced minor collection that occurs when rewriting the assembler at the start of the JIT backend&lt;/li&gt;
&lt;li&gt;Port the resource module to cffi&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;&lt;ul class="simple"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h4&gt;
Internal refactorings:&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Use a simpler logger to speed up translation&lt;/li&gt;
&lt;li&gt;Drop vestiges of Python 2.5 support in testing&lt;/li&gt;
&lt;li&gt;Update rpython functions with ones needed for py3k&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="document" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"&gt;
&lt;div itemprop="articleBody"&gt;
&lt;div class="section" id="pypy-5-1"&gt;
&lt;div class="section" id="other-highlights-since-5-0-released-in-march-2015"&gt;
Please update, and continue to help us make PyPy better.&lt;br /&gt;
Cheers&lt;br /&gt;
The PyPy Team&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;footer&gt;        &lt;div class="rst-footer-buttons" role="navigation"&gt;
&lt;/div&gt;
&lt;/footer&gt;                       &lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/xVsl4SYfAoM" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/4979856639628970409/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=4979856639628970409" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/4979856639628970409" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/4979856639628970409" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/xVsl4SYfAoM/pypy-51-released.html" title="PyPy 5.1 released" /><author><name>mattip</name><uri>http://www.blogger.com/profile/07336549270776418081</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img1.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2016/04/pypy-51-released.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-3688275697656890948</id><published>2016-04-18T11:13:00.001+02:00</published><updated>2016-04-18T11:13:03.084+02:00</updated><title type="text">PyPy Enterprise Edition</title><content type="html">With the latest additions, PyPy's JIT now supports the Z architecture on Linux. The newest architecture revision (also known as s390x, or colloquially referred to as "&lt;a href="https://en.wikipedia.org/wiki/Big_iron" title="Big iron"&gt;big iron&lt;/a&gt;") is the 64-bit extension for IBM mainframes. Currently only Linux 64 bit is supported (not z/OS nor TPF).&lt;br /&gt;
This is the fourth assembler backend supported by PyPy in addition to x86 (32 and 64), ARM (32-bit only) and PPC64 (both little- and big-endian). It might seem that we kind of get a hang of new architectures. Thanks to IBM for funding this work!&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span style="font-size: large;"&gt;History&lt;/span&gt; &lt;/h2&gt;
When I went to university one lecture covered the prediction of Thomas Watson in 1943. His famous quote "I think there is a world market for maybe five computers ...", turned out not to be true. &lt;br /&gt;
&lt;br /&gt;
However, even 70 years later, mainframes are used more often than you think. They back critical tasks requiring a high level of stability/security and offer high hardware and computational utilization rates by virtualization.&lt;br /&gt;
&lt;br /&gt;
With the new PyPy JIT backend we are happy to present a fast Python virtual machine for mainframes and contribute more free software running on s390x.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span style="font-size: large;"&gt;Meta tracing&lt;/span&gt;&lt;/h2&gt;
Even though the JIT backend has been tested on PyPy, it is not restricted to&amp;nbsp; the Python programming language. Do you have a great idea for a DSL, or another language that should run on mainframes? Go ahead and just implement your interpreter using RPython.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span style="font-size: large;"&gt;How do I get a copy?&lt;/span&gt;&lt;/h2&gt;
PyPy can be built using the usual instructions found &lt;a href="http://pypy.org/download.html#building-from-source" target="_blank"&gt;here&lt;/a&gt;. As soon as the next PyPy version has been released we will provide binaries. Until then you can just grab a nightly &lt;a href="http://buildbot.pypy.org/nightly/" target="_blank"&gt;here&lt;/a&gt;.We are currently busy to get the next version of PyPy ready, so an official release will be rolled out soon.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span style="font-size: large;"&gt;&lt;b&gt;Comparing s390x to x86&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;
The goal of this comparison is not to scientifically evaluate the benefits/disadvantages on s390x, but rather to see that PyPy's architecture delivers the same benefits as it does on other platforms. Similar to the comparison done for PPC I ran the benchmarks using the same setup. The first column is the speedup of the PyPy JIT VM compared to the speedup of a pure PyPy interpreter&lt;span style="font-size: xx-small;"&gt; 1)&lt;/span&gt;. Note that the s390x's OS was virtualized.&lt;br /&gt;
&lt;span style="font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;"&gt;&amp;nbsp; Label &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x86&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s390x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s390x (run 2)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;"&gt;&amp;nbsp; ai&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13.7 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12.4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11.9&lt;br /&gt;&amp;nbsp; bm_chameleon&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8.5 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6.8&lt;br /&gt;&amp;nbsp; bm_dulwich_log&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.1&lt;br /&gt;&amp;nbsp; bm_krakatau&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.5 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.0&lt;br /&gt;&amp;nbsp; bm_mako&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8.4 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.9&lt;br /&gt;&amp;nbsp; bm_mdp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.0 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.8&lt;br /&gt;&amp;nbsp; chaos&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 56.9 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 52.6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 53.4&lt;br /&gt;&amp;nbsp; crypto_pyaes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 62.5 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 64.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 64.2&lt;br /&gt;&amp;nbsp; deltablue&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.3 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.6&lt;br /&gt;&amp;nbsp; django&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 28.8 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22.6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 21.7&lt;br /&gt;&amp;nbsp; eparse&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.3 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.6&lt;br /&gt;&amp;nbsp; fannkuch&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9.1 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9.9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.1&lt;br /&gt;&amp;nbsp; float&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13.8 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12.8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13.8&lt;br /&gt;&amp;nbsp; genshi_text&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16.4 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.9&lt;br /&gt;&amp;nbsp; genshi_xml&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8.2 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7.9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8.2&lt;br /&gt;&amp;nbsp; go&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6.7 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11.2&lt;br /&gt;&amp;nbsp; hexiom2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24.3 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 23.8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 23.5&lt;br /&gt;&amp;nbsp; html5lib&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.4 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.7&lt;br /&gt;&amp;nbsp; json_bench&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 28.8 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 27.8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 28.1&lt;br /&gt;&amp;nbsp; meteor-contest&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.1 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.4&lt;br /&gt;&amp;nbsp; nbody_modified&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20.6 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 19.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 19.4&lt;br /&gt;&amp;nbsp; pidigits&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.0 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -1.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -1.0&lt;br /&gt;&amp;nbsp; pyflate-fast&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9.0 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8.7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8.5&lt;br /&gt;&amp;nbsp; pypy_interp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.3 &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 4.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.4&lt;br /&gt;&amp;nbsp; raytrace-simple&amp;nbsp;&amp;nbsp;&amp;nbsp; 69.0 &amp;nbsp;&amp;nbsp;&amp;nbsp; 100.9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 93.4&lt;br /&gt;&amp;nbsp; richards&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 94.1 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 96.6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 84.3&lt;br /&gt;&amp;nbsp; rietveld&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.2 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.7&lt;br /&gt;&amp;nbsp; slowspitfire&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.8 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.2&lt;br /&gt;&amp;nbsp; spambayes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.0 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.8&lt;br /&gt;&amp;nbsp; spectral-norm&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 41.9 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 39.8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 42.6&lt;br /&gt;&amp;nbsp; spitfire&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.8 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.3&lt;br /&gt;&amp;nbsp; spitfire_cstringio&amp;nbsp; 7.6 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7.9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8.2&lt;br /&gt;&amp;nbsp; sympy_expand&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.9 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.8&lt;br /&gt;&amp;nbsp; sympy_integrate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.3 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.0&lt;br /&gt;&amp;nbsp; sympy_str&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.5 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.3&lt;br /&gt;&amp;nbsp; sympy_sum&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6.2 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.9&lt;br /&gt;&amp;nbsp; telco&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 61.2 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 48.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 54.8&lt;br /&gt;&amp;nbsp; twisted_iteration&amp;nbsp; 55.5 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 41.9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 43.8&lt;br /&gt;&amp;nbsp; twisted_names&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8.2 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9.7&lt;br /&gt;&amp;nbsp; twisted_pb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12.1 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.2&lt;br /&gt;&amp;nbsp; twisted_tcp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.9 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;"&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp; Geometric mean:&amp;nbsp;&amp;nbsp;&amp;nbsp; 9.31&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9.10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9.43&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
As you can see the benefits are comparable on both platforms.&lt;br /&gt;
Of course this is scientifically not good enough, but it shows a tendency. s390x can achieve the same results as you can get on x86. &lt;br /&gt;
&lt;br /&gt;
Are you running your business application on a mainframe? We would love to get some feedback. Join us in IRC tell us if PyPy made your application faster! &lt;br /&gt;
&lt;br /&gt;
plan_rich &amp;amp; the PyPy Team&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: xx-small;"&gt;1) PyPy revision for the benchmarks: 4b386bcfee54&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/7FI8Lso_tgo" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/3688275697656890948/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=3688275697656890948" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/3688275697656890948" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/3688275697656890948" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/7FI8Lso_tgo/pypy-enterprise-edition.html" title="PyPy Enterprise Edition" /><author><name>Richard Plangger</name><uri>https://plus.google.com/114742728940931060202</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-fzm2oAI4Fmk/AAAAAAAAAAI/AAAAAAAAAZM/8rpCwmkysf4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2016/04/pypy-enterprise-edition.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-7082900097299909512</id><published>2016-04-07T10:56:00.002+02:00</published><updated>2016-04-07T10:56:34.582+02:00</updated><title type="text">Warmup improvements: more efficient trace representation</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;p&gt;Hello everyone.&lt;/p&gt;
&lt;p&gt;I'm pleased to inform that we've finished another round of
improvements to the warmup performance of PyPy. Before I go
into details, I'll recap the achievements that we've done since we've started
working on the warmup performance. I picked a random PyPy from November 2014
(which is definitely before we started the warmup work) and compared it with
a recent one, after 5.0. The exact revisions are respectively &lt;tt class="docutils literal"&gt;ffce4c795283&lt;/tt&gt;
and &lt;tt class="docutils literal"&gt;cfbb442ae368&lt;/tt&gt;. First let's compare &lt;a class="reference external" href="https://bitbucket.org/pypy/benchmarks/src/59290b59a24e54057d4c694fa4f47e7879a347a0/warmup/?at=default"&gt;pure warmup benchmarks&lt;/a&gt; that
can be found in our benchmarking suite. Out of those,
&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;pypy-graph-alloc-removal&lt;/span&gt;&lt;/tt&gt; numbers should be taken with a grain of salt,
since other work could have influenced the results.
The rest of the benchmarks mentioned is bottlenecked purely by warmup times.&lt;/p&gt;
&lt;p&gt;You can see how much your program spends in warmup running
&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;PYPYLOG=jit-summary:-&lt;/span&gt; pypy &lt;span class="pre"&gt;your-program.py&lt;/span&gt;&lt;/tt&gt; under &amp;quot;tracing&amp;quot; and &amp;quot;backend&amp;quot;
fields (in the first three lines). An example looks like that:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
[e00c145a41] {jit-summary
Tracing:        71      0.053645 &amp;lt;- time spent tracing &amp;amp; optimizing
Backend:        71      0.028659 &amp;lt;- time spent compiling to assembler
TOTAL:                  0.252217 &amp;lt;- total run time of the program
&lt;/pre&gt;
&lt;p&gt;The results of the benchmarks&lt;/p&gt;
&lt;table border="1" class="docutils"&gt;
&lt;colgroup&gt;
&lt;col width="29%" /&gt;
&lt;col width="13%" /&gt;
&lt;col width="13%" /&gt;
&lt;col width="10%" /&gt;
&lt;col width="17%" /&gt;
&lt;col width="17%" /&gt;
&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td&gt;benchmark&lt;/td&gt;
&lt;td&gt;time - old&lt;/td&gt;
&lt;td&gt;time - new&lt;/td&gt;
&lt;td&gt;speedup&lt;/td&gt;
&lt;td&gt;JIT time - old&lt;/td&gt;
&lt;td&gt;JIT time - new&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;function_call&lt;/td&gt;
&lt;td&gt;1.86&lt;/td&gt;
&lt;td&gt;1.42&lt;/td&gt;
&lt;td&gt;1.3x&lt;/td&gt;
&lt;td&gt;1.12s&lt;/td&gt;
&lt;td&gt;0.57s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;function_call2&lt;/td&gt;
&lt;td&gt;5.17s&lt;/td&gt;
&lt;td&gt;2.73s&lt;/td&gt;
&lt;td&gt;1.9x&lt;/td&gt;
&lt;td&gt;4.2s&lt;/td&gt;
&lt;td&gt;1.6s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;bridges&lt;/td&gt;
&lt;td&gt;2.77s&lt;/td&gt;
&lt;td&gt;2.07s&lt;/td&gt;
&lt;td&gt;1.3x&lt;/td&gt;
&lt;td&gt;1.5s&lt;/td&gt;
&lt;td&gt;0.8s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;pypy-graph-alloc-removal&lt;/td&gt;
&lt;td&gt;2.06s&lt;/td&gt;
&lt;td&gt;1.65s&lt;/td&gt;
&lt;td&gt;1.25x&lt;/td&gt;
&lt;td&gt;1.25s&lt;/td&gt;
&lt;td&gt;0.79s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;As we can see, the overall warmup benchmarks got up to &lt;strong&gt;90% faster&lt;/strong&gt; with
JIT time dropping by up to &lt;strong&gt;2.5x&lt;/strong&gt;. We have more optimizations in the pipeline,
with an idea how to transfer some of the JIT gains into more of a total program
runtime by jitting earlier and more eagerly.&lt;/p&gt;
&lt;div class="section" id="details-of-the-last-round-of-optimizations"&gt;
&lt;h1&gt;Details of the last round of optimizations&lt;/h1&gt;
&lt;p&gt;Now the nitty gritty details - what did we actually do? I covered a lot of
warmup improvements in the &lt;a class="reference external" href="http://morepypy.blogspot.com/2015/10/pypy-memory-and-warmup-improvements-2.html"&gt;past&lt;/a&gt; &lt;a class="reference external" href="http://morepypy.blogspot.com/2015/09/pypy-warmup-improvements.html"&gt;blog&lt;/a&gt; posts so I'm going to focus on
the last change, the jit-leaner-frontend branch. This last change is simple, instead of using
pointers to store the &amp;quot;operations&amp;quot; objects created during tracing, we use a compact list of
16-bit integers (with 16bit pointers in between). On 64bit machine the memory wins are
tremendous - the new representation is 4x more efficient to use 16bit pointers than full 64bit pointers.
Additionally, the smaller representation has much better cache behavior and much less
pointer chasing in memory. It also has a better defined lifespan, so we don't need to
bother tracking them by the GC, which also saves quite a bit of time.&lt;/p&gt;
&lt;p&gt;The change sounds simple, but the details in the underlaying data mean that
everything in the JIT had to be changed which took quite a bit of effort :-)&lt;/p&gt;
&lt;p&gt;Going into the future on the JIT front, we have an exciting set of optimizations,
ranging from faster loops through faster warmup to using better code generation
techniques and broadening the kind of program that PyPy speeds up. Stay tuned
for the updates.&lt;/p&gt;
&lt;p&gt;We would like to thank our commercial partners for making all of this possible.
The work has been performed by &lt;a class="reference external" href="http://baroquesoftware.com"&gt;baroquesoftware&lt;/a&gt; and would not be possible
without support from people using PyPy in production. If your company uses
PyPy and want it to do more or does not use PyPy but has performance problems
with the Python installation, feel free to get in touch with me, trust me using
PyPy ends up being a lot cheaper than rewriting everything in go :-)&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Maciej Fijalkowski&lt;/p&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/2SHOuGWAbFo" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/7082900097299909512/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=7082900097299909512" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/7082900097299909512" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/7082900097299909512" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/2SHOuGWAbFo/warmup-improvements-more-efficient.html" title="Warmup improvements: more efficient trace representation" /><author><name>Maciej Fijalkowski</name><uri>http://www.blogger.com/profile/11410841070239382771</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img1.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2016/04/warmup-improvements-more-efficient.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-2218405735970044084</id><published>2016-03-19T17:44:00.000+01:00</published><updated>2016-04-03T20:52:33.689+02:00</updated><title type="text">PyPy 5.0.1 bugfix released</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
&lt;span style="font-size: x-large;"&gt;PyPy 5.0.1&lt;/span&gt;&lt;/h2&gt;
&lt;br /&gt;
We have released a bugfix for PyPy 5.0, after reports that the newly released
&lt;a class="reference external" href="https://pypi.python.org/pypi/lxml/3.6.0"&gt;lxml 3.6.0&lt;/a&gt;, which now supports PyPy 5.0 +, can &lt;a class="reference external" href="https://bitbucket.org/pypy/pypy/issues/2260"&gt;crash on large files&lt;/a&gt;.
Thanks to those who reported the crash. Please update, downloads are available
at&lt;br /&gt;
&lt;br /&gt;
&lt;a href="pypy.org/download.html"&gt;pypy.org/download.html&lt;/a&gt;&lt;br /&gt;

&lt;br /&gt;
The changes between PyPy 5.0 and 5.0.1 are only two bug fixes: one in
cpyext, which fixes notably (but not only) lxml; and another for a
corner case of the JIT.&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style="text-align: center;"&gt;
What is PyPy?&lt;/h3&gt;
&lt;div style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
PyPy is a very compliant Python interpreter, almost a drop-in replacement for
CPython 2.7. It’s fast (&lt;a class="reference external" href="http://speed.pypy.org/"&gt;PyPy and CPython 2.7.x&lt;/a&gt; performance comparison)
due to its integrated tracing JIT compiler.&lt;br /&gt;

We also welcome developers of other
&lt;a class="reference external" href="http://pypyjs.org/"&gt;dynamic languages&lt;/a&gt; to see what RPython can do for them.&lt;br /&gt;

This release supports &lt;strong&gt;x86&lt;/strong&gt; machines on most common operating systems
(Linux 32/64, Mac OS X 64, Windows 32, OpenBSD, FreeBSD),
newer &lt;strong&gt;ARM&lt;/strong&gt; hardware (ARMv6 or ARMv7, with VFPv3) running Linux, and the
big- and little-endian variants of &lt;strong&gt;PPC64&lt;/strong&gt; running Linux.&lt;br /&gt;

&lt;br /&gt;
Please update, and continue to help us make PyPy better.&lt;br /&gt;

&lt;br /&gt;
Cheers&lt;br /&gt;

The PyPy Team&lt;br /&gt;





           
          
          
  
    &lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/943GJlUML7g" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/2218405735970044084/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=2218405735970044084" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/2218405735970044084" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/2218405735970044084" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/943GJlUML7g/pypy-501-bugfix-released.html" title="PyPy 5.0.1 bugfix released" /><author><name>mattip</name><uri>http://www.blogger.com/profile/07336549270776418081</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img1.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2016/03/pypy-501-bugfix-released.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-5730569530415927220</id><published>2016-03-10T18:03:00.000+01:00</published><updated>2016-03-10T18:03:45.033+01:00</updated><title type="text">PyPy 5.0 released</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h1&gt;
PyPy 5.0&lt;/h1&gt;
We have released PyPy 5.0, about three months after PyPy 4.0.1. We encourage all users of PyPy to update to this version.&lt;br /&gt;
&lt;br /&gt;
You can download the PyPy 5.0 release here:&lt;br /&gt;
&lt;blockquote&gt;
&lt;div&gt;
&lt;a class="reference external" href="http://pypy.org/download.html"&gt;http://pypy.org/download.html&lt;/a&gt;&lt;/div&gt;
&lt;/blockquote&gt;
We would like to thank our donors for the continued support of the PyPy project.&lt;br /&gt;
We would also like to thank our contributors and encourage new people to join the project. PyPy has many layers and we need help with all of them: &lt;a class="reference external" href="http://doc.pypy.org/"&gt;PyPy&lt;/a&gt; and &lt;a class="reference external" href="https://rpython.readthedocs.org/"&gt;RPython&lt;/a&gt; documentation improvements, tweaking popular &lt;a class="reference external" href="http://doc.pypy.org/en/latest/project-ideas.html#make-more-python-modules-pypy-friendly"&gt;modules&lt;/a&gt; to run on pypy, or general &lt;a class="reference external" href="http://doc.pypy.org/en/latest/project-ideas.html"&gt;help&lt;/a&gt; with making RPython’s JIT even better.&lt;br /&gt;
&lt;h3 style="text-align: center;"&gt;
&amp;nbsp;&lt;/h3&gt;
&lt;h3 style="text-align: center;"&gt;
Faster and Leaner&lt;/h3&gt;
&lt;div class="section" id="new-version-numbering"&gt;
We continue to improve the warmup time and memory usage of JIT-related metadata. The exact effects depend vastly on the program you’re running and can range from insignificant to warmup being up to 30% faster and memory dropping by about 30%. &lt;/div&gt;
&lt;h3 style="text-align: center;"&gt;
&amp;nbsp;&lt;/h3&gt;
&lt;h3 style="text-align: center;"&gt;
C-API Upgrade&lt;/h3&gt;
&lt;div class="section" id="vectorization"&gt;
We also merged a major upgrade to our C-API layer (cpyext), simplifying the interaction between c-level objects and PyPy interpreter level objects. As a result, lxml  (prerelease) with its cython compiled component &lt;a class="reference external" href="https://bitbucket.org/pypy/compatibility/wiki/lxml"&gt;passes all tests&lt;/a&gt; on PyPy. The new cpyext is also much faster. This major refactoring will soon be followed by an expansion of our C-API compatibility.&lt;/div&gt;
&lt;h3 style="text-align: center;"&gt;
&amp;nbsp;&lt;/h3&gt;
&lt;h3 style="text-align: center;"&gt;
Profiling with vmprof supported on more platforms&lt;/h3&gt;
&lt;br /&gt;
&lt;div class="section" id="internal-refactoring-and-warmup-time-improvement"&gt;
&lt;a class="reference external" href="http://vmprof.readthedocs.org/"&gt;vmprof&lt;/a&gt; has been a go-to profiler for PyPy on linux for a few releases and we’re happy to announce that thanks to the cooperation with jetbrains, vmprof now works on Linux, OS X and Windows on both PyPy and CPython.&lt;/div&gt;
&lt;div class="section" id="cffi"&gt;
&lt;h3 style="text-align: center;"&gt;
&amp;nbsp;&lt;/h3&gt;
&lt;h3 style="text-align: center;"&gt;
CFFI&lt;/h3&gt;
While not applicable only to PyPy, &lt;a class="reference external" href="https://cffi.readthedocs.org/"&gt;cffi&lt;/a&gt; is arguably our most significant contribution to the python ecosystem. PyPy 5.0 ships with &lt;a class="reference external" href="http://cffi.readthedocs.org/en/latest/whatsnew.html#v1-5-2"&gt;cffi-1.5.2&lt;/a&gt; which now allows embedding PyPy (or CPython) in a C program.&lt;/div&gt;
&lt;div class="section" id="what-is-pypy"&gt;
&lt;h3 style="text-align: center;"&gt;
&amp;nbsp;&lt;/h3&gt;
&lt;h3 style="text-align: center;"&gt;
What is PyPy?&lt;/h3&gt;
&lt;br /&gt;
PyPy is a very compliant Python interpreter, almost a drop-in replacement for CPython 2.7. It’s fast (&lt;a class="reference external" href="http://speed.pypy.org/"&gt;pypy and cpython 2.7.x&lt;/a&gt; performance comparison) due to its integrated tracing JIT compiler.&lt;br /&gt;
We also welcome developers of other &lt;a class="reference external" href="http://pypyjs.org/"&gt;dynamic languages&lt;/a&gt; to see what RPython can do for them.&lt;br /&gt;
This release supports &lt;b&gt;x86&lt;/b&gt; machines on most common operating systems (Linux 32/64, Mac OS X 64, Windows 32, &lt;a class="reference external" href="http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/lang/pypy"&gt;OpenBSD&lt;/a&gt;, &lt;a class="reference external" href="https://svnweb.freebsd.org/ports/head/lang/pypy/"&gt;freebsd&lt;/a&gt;), newer &lt;b&gt;ARM&lt;/b&gt; hardware (ARMv6 or ARMv7, with VFPv3) running Linux, and &lt;b&gt;64 bit PowerPC &lt;/b&gt;hardware, specifically Linux running the big- and little-endian variants of ppc64.&lt;/div&gt;
&lt;div class="section" id="other-highlights-since-4-0-1-released-in-november-2015"&gt;
&lt;h3 style="text-align: left;"&gt;
&amp;nbsp;&lt;/h3&gt;
&lt;h3 style="text-align: left;"&gt;
Other Highlights (since 4.0.1 released in November 2015)&lt;/h3&gt;
&lt;ul class="simple" style="text-align: left;"&gt;
&lt;li&gt;New features:&lt;ul&gt;
&lt;li&gt;Support embedding PyPy in a C-program via cffi and static callbacks in cffi.&lt;br /&gt;
This deprecates the old method of embedding PyPy&lt;/li&gt;
&lt;li&gt;Refactor vmprof to work cross-operating-system, deprecate using buggy&lt;br /&gt;
libunwind on Linux platforms. Vmprof even works on Windows now.&lt;/li&gt;
&lt;li&gt;Support more of the C-API type slots, like tp_getattro, and fix C-API&lt;br /&gt;
macros, functions, and structs such as _PyLong_FromByteArray(),&lt;br /&gt;
PyString_GET_SIZE, f_locals in PyFrameObject, Py_NAN, co_filename in&lt;br /&gt;
PyCodeObject&lt;/li&gt;
&lt;li&gt;Use a more stable approach for allocating PyObjects in cpyext. (see&lt;br /&gt;
&lt;a class="reference external" href="http://morepypy.blogspot.com/2016/02/c-api-support-update.html"&gt;blog post&lt;/a&gt;). Once the PyObject corresponding to a PyPy object is created,&lt;br /&gt;
it stays around at the same location until the death of the PyPy object.&lt;br /&gt;
Done with a little bit of custom GC support.  It allows us to kill the&lt;br /&gt;
notion of “borrowing” inside cpyext, reduces 4 dictionaries down to 1, and&lt;br /&gt;
significantly simplifies the whole approach (which is why it is a new&lt;br /&gt;
feature while technically a refactoring) and allows PyPy to support the&lt;br /&gt;
populart lxml module (as of the &lt;i&gt;next&lt;/i&gt; release) with no PyPy specific&lt;br /&gt;
patches needed&lt;/li&gt;
&lt;li&gt;Make the default filesystem encoding ASCII, like CPython&lt;/li&gt;
&lt;li&gt;Use &lt;a class="reference external" href="http://hypothesis.readthedocs.org/"&gt;hypothesis&lt;/a&gt; in test creation, which is great for randomizing tests&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;&lt;ul&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Bug Fixes&lt;ul&gt;
&lt;li&gt;Backport always using os.urandom for uuid4 from cpython and fix the JIT as well&lt;br /&gt;
(issue #2202)&lt;/li&gt;
&lt;li&gt;More completely support datetime, optimize timedelta creation&lt;/li&gt;
&lt;li&gt;Fix for issue #2185 which caused an inconsistent list of operations to be&lt;br /&gt;
generated by the unroller, appeared in a complicated DJango app&lt;/li&gt;
&lt;li&gt;Fix an elusive issue with stacklets on shadowstack which showed up when&lt;br /&gt;
forgetting stacklets without resuming them&lt;/li&gt;
&lt;li&gt;Fix entrypoint() which now acquires the GIL&lt;/li&gt;
&lt;li&gt;Fix direct_ffi_call() so failure does not bail out before setting CALL_MAY_FORCE&lt;/li&gt;
&lt;li&gt;Fix (de)pickling long values by simplifying the implementation&lt;/li&gt;
&lt;li&gt;Fix RPython rthread so that objects stored as threadlocal do not force minor&lt;br /&gt;
GC collection and are kept alive automatically. This improves perfomance of&lt;br /&gt;
short-running Python callbacks and prevents resetting such object between&lt;br /&gt;
calls&lt;/li&gt;
&lt;li&gt;Support floats as parameters to itertools.isslice()&lt;/li&gt;
&lt;li&gt;Check for the existence of CODESET, ignoring it should have prevented PyPy&lt;br /&gt;
from working on FreeBSD&lt;/li&gt;
&lt;li&gt;Fix for corner case (likely shown by Krakatau) for consecutive guards with&lt;br /&gt;
interdependencies&lt;/li&gt;
&lt;li&gt;Fix applevel bare class method comparisons which should fix pretty printing&lt;br /&gt;
in IPython&lt;/li&gt;
&lt;li&gt;Issues reported with our previous release were &lt;a class="reference external" href="http://doc.pypy.org/en/latest/whatsnew-5.0.0.html"&gt;resolved&lt;/a&gt; after reports from users on our issue tracker at &lt;a class="reference external" href="https://bitbucket.org/pypy/pypy/issues"&gt;https://bitbucket.org/pypy/pypy/issues&lt;/a&gt; or on IRC at #pypy&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;&lt;ul&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Numpy:&lt;ul&gt;
&lt;li&gt;Updates to numpy 1.10.2 (incompatibilities and not-implemented features&lt;br /&gt;
still exist)&lt;/li&gt;
&lt;li&gt;Support dtype=((‘O’, spec)) union while disallowing record arrays with&lt;br /&gt;
mixed object, non-object values&lt;/li&gt;
&lt;li&gt;Remove all traces of micronumpy from cpyext if –withoutmod-micronumpy option used&lt;/li&gt;
&lt;li&gt;Support indexing filtering with a boolean ndarray&lt;/li&gt;
&lt;li&gt;Support partition() as an app-level function, together with a cffi wrapper&lt;br /&gt;
in pypy/numpy, this now provides partial support for partition()&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;&lt;ul&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Performance improvements:&lt;ul&gt;
&lt;li&gt;Optimize global lookups&lt;/li&gt;
&lt;li&gt;Improve the memory signature of numbering instances in the JIT. This should&lt;br /&gt;
massively decrease the amount of memory consumed by the JIT, which is&lt;br /&gt;
significant for most programs. Also compress the numberings using variable-&lt;br /&gt;
size encoding&lt;/li&gt;
&lt;li&gt;Optimize string concatenation&lt;/li&gt;
&lt;li&gt;Use INT_LSHIFT instead of INT_MUL when possible&lt;/li&gt;
&lt;li&gt;Improve struct.unpack by casting directly from the underlying buffer.&lt;br /&gt;
Unpacking floats and doubles is about 15 times faster, and integer types&lt;br /&gt;
about 50% faster (on 64 bit integers). This was then subsequently&lt;br /&gt;
improved further in optimizeopt.py.&lt;/li&gt;
&lt;li&gt;Optimize two-tuple lookups in mapdict, which improves warmup of instance&lt;br /&gt;
variable access somewhat&lt;/li&gt;
&lt;li&gt;Reduce all guards from int_floordiv_ovf if one of the arguments is constant&lt;/li&gt;
&lt;li&gt;Identify permutations of attributes at instance creation, reducing the&lt;br /&gt;
number of bridges created&lt;/li&gt;
&lt;li&gt;Greatly improve re.sub() performance&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;&lt;ul&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Internal refactorings:&lt;ul&gt;
&lt;li&gt;Refactor and improve exception analysis in the annotator&lt;/li&gt;
&lt;li&gt;Remove unnecessary special handling of space.wrap().&lt;/li&gt;
&lt;li&gt;Support list-resizing setslice operations in RPython&lt;/li&gt;
&lt;li&gt;Tweak the trace-too-long heuristic for multiple jit drivers&lt;/li&gt;
&lt;li&gt;Refactor bookkeeping (such a cool word - three double letters) in the&lt;br /&gt;
annotater&lt;/li&gt;
&lt;li&gt;Refactor wrappers for OS functions from rtyper to rlib and simplify them&lt;/li&gt;
&lt;li&gt;Simplify backend loading instructions to only use four variants&lt;/li&gt;
&lt;li&gt;Simplify GIL handling in non-jitted code&lt;/li&gt;
&lt;li&gt;Refactor naming in optimizeopt&lt;/li&gt;
&lt;li&gt;Change GraphAnalyzer to use a more precise way to recognize external&lt;br /&gt;
functions and fix null pointer handling, generally clean up external&lt;br /&gt;
function handling&lt;/li&gt;
&lt;li&gt;Remove pure variants of &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;getfield_gc_*&lt;/span&gt;&lt;/code&gt; operations from the JIT by&lt;br /&gt;
determining purity while tracing&lt;/li&gt;
&lt;li&gt;Refactor databasing&lt;/li&gt;
&lt;li&gt;Simplify bootstrapping in cpyext&lt;/li&gt;
&lt;li&gt;Refactor rtyper debug code into python.rtyper.debug&lt;/li&gt;
&lt;li&gt;Seperate structmember.h from Python.h Also enhance creating api functions&lt;br /&gt;
to specify which header file they appear in (previously only pypy_decl.h)&lt;/li&gt;
&lt;li&gt;Fix tokenizer to enforce universal newlines, needed for Python 3 support&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
Please try it out and let us know what you think. We welcome feedback, we know you are using PyPy, please tell us about it!&lt;br /&gt;
Cheers&lt;br /&gt;
The PyPy Team&lt;/div&gt;
&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/XeeyuQ5W8dI" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/5730569530415927220/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=5730569530415927220" title="12 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/5730569530415927220" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/5730569530415927220" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/XeeyuQ5W8dI/pypy-50-released.html" title="PyPy 5.0 released" /><author><name>mattip</name><uri>http://www.blogger.com/profile/07336549270776418081</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img1.blogblog.com/img/b16-rounded.gif" /></author><thr:total>12</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2016/03/pypy-50-released.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-8582726091670983181</id><published>2016-02-25T16:54:00.001+01:00</published><updated>2016-02-25T17:24:52.215+01:00</updated><title type="text">C-API Support update</title><content type="html">&lt;p&gt;As you know, PyPy can emulate the CPython C API to some extent. In this post I will describe an important optimization that we merged to improve the performance and stability of the C-API emulation layer.&lt;/p&gt;

&lt;p&gt;The C-API is implemented by passing around &lt;code&gt;PyObject *&lt;/code&gt; pointers in the C code.  The problem with providing the same interface with PyPy is that
objects don't natively have the same &lt;code&gt;PyObject *&lt;/code&gt; structure at all; and
additionally their memory address can change.  PyPy handles the
difference by maintaining two sets of objects.  More precisely, starting
from a PyPy object, it can allocate on demand a &lt;code&gt;PyObject&lt;/code&gt; structure
and fill it with information that points back to the original PyPy
objects; and conversely, starting from a C-level object, it can allocate
a PyPy-level object and fill it with information in the opposite
direction.&lt;/p&gt;

&lt;p&gt;I have merged a rewrite of the interaction between C-API C-level objects
and PyPy's interpreter level objects.  This is mostly a simplification
based on a small hack in our garbage collector.  This hack makes the
garbage collector aware of the reference-counted &lt;code&gt;PyObject&lt;/code&gt;
structures.  When it considers a pair consisting of a PyPy object and a
&lt;code&gt;PyObject&lt;/code&gt;, it will always free either none or both of them at the
same time.  They both stay alive if &lt;i&gt;either&lt;/i&gt; there is a regular GC
reference to the PyPy object, &lt;i&gt;or&lt;/i&gt; the reference counter in the
&lt;code&gt;PyObject&lt;/code&gt; is bigger than zero.&lt;/p&gt;

&lt;p&gt;This gives a more stable result.  Previously, a PyPy object might grow a
corresponding &lt;code&gt;PyObject&lt;/code&gt;, loose it (when its reference counter goes to
zero), and later have another corresponding &lt;code&gt;PyObject&lt;/code&gt; re-created at a
different address.  Now, once a link is created, it remains alive until
both objects die.&lt;/p&gt;

&lt;p&gt;The rewrite significantly simplifies our previous code (which used to be
based on at least 4 different dictionaries), and should make using the
C-API somewhat faster (though it is still slower than using pure
python or cffi).&lt;/p&gt;

&lt;p&gt;A side effect of this work is that now PyPy actually supports the upstream &lt;a
href="https://github.com/lxml/lxml"&gt;lxml&lt;/a&gt; package---which is is one
of the most popular packages on PyPI.  (Specifically, you need version
3.5.0 with &lt;a href="https://github.com/lxml/lxml/pull/187"&gt;this pull
request&lt;/a&gt; to remove old PyPy-specific hacks that were not really
working.  &lt;a
href="https://bitbucket.org/pypy/compatibility/wiki/lxml"&gt;See
details&lt;/a&gt;.)  At this point, we no longer recommend using the
&lt;code&gt;cffi-lxml&lt;/code&gt; alternative: although it may still be faster, it might be
incomplete and old.&lt;/p&gt;

&lt;p&gt;We are actively working on extending our C-API support, and hope to soon
merge a branch to support more of the C-API functions (some numpy news
coming!).  Please &lt;a href="http://buildbot.pypy.org/nightly/trunk/"&gt;try
it out&lt;/a&gt; and let us know how it works for you.&lt;/p&gt;

&lt;p&gt;Armin Rigo and the PyPy team&lt;/p&gt;

&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/S2p48K40LA8" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/8582726091670983181/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=8582726091670983181" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/8582726091670983181" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/8582726091670983181" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/S2p48K40LA8/c-api-support-update.html" title="C-API Support update" /><author><name>Armin Rigo</name><uri>http://www.blogger.com/profile/06300515270104686574</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img1.blogblog.com/img/b16-rounded.gif" /></author><thr:total>4</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2016/02/c-api-support-update.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-8493496761738752124</id><published>2016-01-06T12:17:00.000+01:00</published><updated>2016-01-06T12:17:40.406+01:00</updated><title type="text">Using CFFI for embedding</title><content type="html">&lt;h3&gt;Introduction&lt;/h3&gt;

&lt;p&gt;&lt;a href="http://cffi.readthedocs.org/"&gt;CFFI&lt;/a&gt; has been a great success so far to call C libraries in your
Python programs, in a way that is both simple and that works across
CPython 2.x and 3.x and PyPy.&lt;/p&gt;

&lt;p&gt;This post assumes that you know what CFFI is and how to use it in
API mode (&lt;tt class="docutils literal"&gt;ffi.cdef()&lt;/tt&gt;, &lt;tt class="docutils literal"&gt;ffi.set_source()&lt;/tt&gt;, &lt;tt class="docutils literal"&gt;ffi.compile()&lt;/tt&gt;).
A quick overview can be found &lt;a href="http://cffi.readthedocs.org/en/latest/overview.html#real-example-api-level-out-of-line"&gt;in this paragraph.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The major news of CFFI 1.4, released last december, was that you can
now declare C functions with &lt;tt class="docutils literal"&gt;extern &amp;quot;Python&amp;quot;&lt;/tt&gt; in the &lt;tt class="docutils literal"&gt;cdef()&lt;/tt&gt;.
These magic keywords make the function callable from C (where it is
defined automatically), but calling it will call some Python code
(which you attach with the &lt;tt class="docutils literal"&gt;&amp;#64;ffi.def_extern()&lt;/tt&gt; decorator).  This is
useful because it gives a more straightforward, faster and
libffi-independent way to write callbacks.  For more details, see &lt;a href="http://cffi.readthedocs.org/en/latest/using.html#extern-python-new-style-callbacks"&gt;the
documentation.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You are, in effect, declaring a static family of C functions which
call Python code.  The idea is to take pointers to them, and pass them
around to other C functions, as callbacks.  However, the idea of a set
of C functions which call Python code opens another path: &lt;em&gt;embedding&lt;/em&gt;
Python code inside non-Python programs.&lt;/p&gt;

&lt;h3&gt;Embedding&lt;/h3&gt;

&lt;p&gt;Embedding is traditionally done using the CPython C API: from C code,
you call &lt;tt class="docutils literal"&gt;Py_Initialize()&lt;/tt&gt; and then some other functions like
&lt;tt class="docutils literal"&gt;PyRun_SimpleString()&lt;/tt&gt;.  In the simple cases it is, indeed, simple
enough; but it can become a complicated story if you throw in
supporting application-dependent object types; and a messy story if
you add correctly running on multiple threads, for example.&lt;/p&gt;
&lt;p&gt;Moreover, this approach is specific to CPython (2.x or 3.x).  It does
not work at all on PyPy, which has its own very different, minimal
&lt;a href="http://pypy.readthedocs.org/en/latest/embedding.html"&gt;embedding API.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The new-and-coming thing about CFFI 1.5, meant as replacement of the
above solutions, is direct embedding support---with no fixed API at
all.  The idea is to write some Python script with a &lt;tt class="docutils literal"&gt;cdef()&lt;/tt&gt; which
declares a number of &lt;tt class="docutils literal"&gt;extern &amp;quot;Python&amp;quot;&lt;/tt&gt; functions.  When running the
script, it creates the C source code and compiles it to a
dynamically-linked library (&lt;tt class="docutils literal"&gt;.so&lt;/tt&gt; on Linux).  This is the same as in
the regular API-mode usage.  What is new is that these &lt;tt class="docutils literal"&gt;extern
&amp;quot;Python&amp;quot;&lt;/tt&gt; can now also be &lt;em&gt;exported&lt;/em&gt; from the &lt;tt class="docutils literal"&gt;.so&lt;/tt&gt;, in the C
sense.  You also give a bit of initialization-time Python code
directly in the script, which will be compiled into the &lt;tt class="docutils literal"&gt;.so&lt;/tt&gt; too.&lt;/p&gt;
&lt;p&gt;This library can now be used directly from any C program (and it is
still importable in Python).  It exposes the C API of your choice,
which you specified with the &lt;tt class="docutils literal"&gt;extern &amp;quot;Python&amp;quot;&lt;/tt&gt; declarations.  You
can use it to make whatever custom API makes sense in your particular
case.  You can even directly make a &amp;quot;plug-in&amp;quot; for any program that
supports them, just by exporting the API expected for such plugins.&lt;/p&gt;

&lt;h3&gt;Trying it out on CPython&lt;/h3&gt;

&lt;p&gt;This is still being finalized, but please try it out.  You can
see &lt;a href="https://bitbucket.org/cffi/cffi/src/static-callback-embedding/demo/embedding.py"&gt;embedding.py&lt;/a&gt; directly online for a quick glance.  Or
see below the instructions on Linux with CPython 2.7 (CPython 3.x and
non-Linux platforms are still a work in progress right now, but this
should be quickly fixed):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p class="first"&gt;get the branch &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;static-callback-embedding&lt;/span&gt;&lt;/tt&gt; of CFFI:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
hg clone https://bitbucket.org/cffi/cffi
hg up static-callback-embedding
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;make the &lt;tt class="docutils literal"&gt;_cffi_backend.so&lt;/tt&gt;:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
python setup_base.py build_ext -f -i
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;run &lt;tt class="docutils literal"&gt;embedding.py&lt;/tt&gt; in the &lt;tt class="docutils literal"&gt;demo&lt;/tt&gt; directory:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
cd demo
PYTHONPATH=.. python embedding.py
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;this produces &lt;tt class="docutils literal"&gt;_embedding_cffi.c&lt;/tt&gt;.  Run &lt;tt class="docutils literal"&gt;gcc&lt;/tt&gt; to build it.  On Linux:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
gcc -shared -fPIC _embedding_cffi.c -o _embedding_cffi.so  \
    -lpython2.7 -I/usr/include/python2.7
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;try out the demo C program in &lt;tt class="docutils literal"&gt;embedding_test.c&lt;/tt&gt;:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
gcc embedding_test.c _embedding_cffi.so
PYTHONPATH=.. LD_LIBRARY_PATH=. ./a.out
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that if you get &lt;tt class="docutils literal"&gt;ImportError: cffi extension module
'_embedding_cffi' has unknown version 0x2701&lt;/tt&gt;, it means that the
&lt;tt class="docutils literal"&gt;_cffi_backend&lt;/tt&gt; module loaded is a pre-installed one instead of the
more recent one in "&lt;tt class="docutils literal"&gt;..&lt;/tt&gt;".  Be sure to use &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;PYTHONPATH=..&lt;/span&gt;&lt;/tt&gt; for now.  (Some installations manage to be confused enough to load the system-wide cffi even if another version is in the PYTHONPATH.  I think a virtualenv can be used to work around this issue.)&lt;/p&gt;

&lt;h3&gt;Try it out on PyPy&lt;/h3&gt;

&lt;p&gt;Very similar steps can be followed on PyPy, but it requires the
&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;cffi-static-callback-embedding&lt;/span&gt;&lt;/tt&gt; branch of PyPy, which you must
first translate from sources.  The difference is then that you need to
adapt the first &lt;tt class="docutils literal"&gt;gcc&lt;/tt&gt; command line: replace &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;-lpython2.7&lt;/span&gt;&lt;/tt&gt; with
&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;-lpypy-c&lt;/span&gt;&lt;/tt&gt; and to fix the &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;-I&lt;/span&gt;&lt;/tt&gt; path (and possibly add a &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;-L&lt;/span&gt;&lt;/tt&gt;
path).&lt;/p&gt;

&lt;h3&gt;More details&lt;/h3&gt;

&lt;p&gt;How it works, more precisely, is by automatically initializing CPython/PyPy
the first time any of the &lt;tt class="docutils literal"&gt;extern &amp;quot;Python&amp;quot;&lt;/tt&gt;
functions is called from the C program.  This is done using locks in case of multi-threading,
so several threads can concurrently do this "first call".  This should work even if two
different threads call the first time a function from two &lt;em&gt;different&lt;/em&gt;
embedded CFFI extensions that happen to be linked with the same program.  Explicit initialization is
never needed.&lt;/p&gt;

&lt;p&gt;The custom initialization-time Python code you put in
&lt;tt class="docutils literal"&gt;ffi.embedding_init_code()&lt;/tt&gt; is executed at that time.  If this code
starts to be big, you can move it to independent modules or packages.
Then the initialization-time Python code only needs to import them.  In
that case, you have to carefully set up &lt;tt class="docutils literal"&gt;sys.path&lt;/tt&gt; if the modules are
not installed in the usual Python way.&lt;/p&gt;
&lt;p&gt;If the Python code is big and full of dependencies, a better alternative
would be to use virtualenv.  How to do that is not fully fleshed out so
far.  You can certainly run the whole program with the environment
variables set up by the virtualenv's &lt;tt class="docutils literal"&gt;activate&lt;/tt&gt; script first.  There
are probably other solutions that involve using gcc's
&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;-Wl,-rpath=\$ORIGIN/&lt;/span&gt;&lt;/tt&gt; or &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;-Wl,-rpath=/fixed/path/&lt;/span&gt;&lt;/tt&gt; options to load
a specific libpython or libypypy-c library.  If you try it out and it
doesn't work the way you would like, please complain &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;:-)&lt;/span&gt;&lt;/tt&gt;&lt;/p&gt;
&lt;p&gt;Another point: right now this does not support CPython's notion of
multiple subinterpreters.  The logic creates a single global Python
interpreter, and runs everything in that context.  Maybe a future
version would have an explicit API to do that &amp;mdash; or maybe it should be
the job of a 3rd-party extension module to provide a Python interface
over the notion of subinterpreters...&lt;/p&gt;
&lt;p&gt;More generally, any feedback is appreciated.&lt;/p&gt;
&lt;p&gt;Have fun,&lt;/p&gt;
&lt;p&gt;Armin&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/ACOIDV_7Emc" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/8493496761738752124/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=8493496761738752124" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/8493496761738752124" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/8493496761738752124" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/ACOIDV_7Emc/using-cffi-for-embedding.html" title="Using CFFI for embedding" /><author><name>Armin Rigo</name><uri>http://www.blogger.com/profile/06300515270104686574</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img1.blogblog.com/img/b16-rounded.gif" /></author><thr:total>7</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2016/01/using-cffi-for-embedding.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-1737200016169608469</id><published>2016-01-04T13:24:00.001+01:00</published><updated>2017-01-24T12:01:15.091+01:00</updated><title type="text">Leysin Winter Sprint (20-27th February 2016)</title><content type="html">&lt;p&gt;The next PyPy sprint will be in Leysin, Switzerland, for the eleventh time.
This is a fully public sprint: newcomers and topics other than those
proposed below are welcome.&lt;/p&gt;
&lt;div class="section" id="goals-and-topics-of-the-sprint"&gt;
&lt;h3&gt;Goals and topics of the sprint&lt;/h3&gt;
&lt;p&gt;The details depend on who is here and ready to work.  The list of
topics is mostly the same as last year (did PyPy became a mature
project with only long-term goals?):&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;cpyext (CPython C API emulation layer): various speed and
completeness topics&lt;/li&gt;
&lt;li&gt;cleaning up the optimization step in the JIT, change the register
allocation done by the JIT's backend, or more improvements to the
warm-up time&lt;/li&gt;
&lt;li&gt;finish vmprof - a statistical profiler for CPython and PyPy&lt;/li&gt;
&lt;li&gt;Py3k (Python 3.x support), NumPyPy (the numpy module)&lt;/li&gt;
&lt;li&gt;STM (Software Transaction Memory), notably: try to come up with
benchmarks, and measure them carefully in order to test and improve
the conflict reporting tools, and more generally to figure out how
practical it is in large projects to avoid conflicts&lt;/li&gt;
&lt;li&gt;And as usual, the main side goal is to have fun in winter sports :-)
We can take a day off for ski.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="exact-times"&gt;
&lt;h3&gt;Exact times&lt;/h3&gt;
&lt;p&gt;I have booked the week from Saturday 20 to Saturday 27.  It is fine to
leave either the 27 or the 28, or even stay a few
more days on either side.  The plan is to work full days between the 21
and the 27.  You are of course allowed to show up for a part of that
time only, too.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="location-accomodation"&gt;
&lt;h3&gt;Location &amp;amp; Accomodation&lt;/h3&gt;
&lt;p&gt;Leysin, Switzerland, &amp;quot;same place as before&amp;quot;.  Let me refresh your
memory: both the sprint venue and the lodging will be in a
pair of chalets built specifically for bed &amp;amp; breakfast:
&lt;a class="reference external" href="http://www.ermina.ch/"&gt;http://www.ermina.ch/&lt;/a&gt;.  The place has a good ADSL Internet connection
with wireless installed.  You can also arrange your own lodging
elsewhere (as long as you are in Leysin, you cannot be more than a 15
minutes walk away from the sprint venue).&lt;/p&gt;
&lt;p&gt;Please &lt;em&gt;confirm&lt;/em&gt; that you are coming so that we can adjust the
reservations as appropriate.&lt;/p&gt;
&lt;p&gt;The options of rooms are a bit more limited than on previous years
because the place for bed-and-breakfast is shrinking: what is
guaranteed is only one double-bed room and a bigger room with 5-6
individual beds (the latter at 50-60 CHF per night, breakfast
included).  If there are more people that would prefer a single room,
please contact me and we'll see what choices you have.  There are a
choice of hotels, many of them reasonably priced for Switzerland.&lt;/p&gt;
&lt;p&gt;Please register by Mercurial:&lt;/p&gt;
&lt;blockquote&gt;
&lt;a href="https://bitbucket.org/pypy/extradoc/"&gt;https://bitbucket.org/pypy/extradoc/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://bitbucket.org/pypy/extradoc/raw/extradoc/sprintinfo/leysin-winter-2016"&gt;https://bitbucket.org/pypy/extradoc/raw/extradoc/sprintinfo/leysin-winter-2016&lt;/a&gt;&lt;/blockquote&gt;
&lt;p&gt;or on the pypy-dev mailing list if you do not yet have check-in rights:&lt;/p&gt;
&lt;blockquote&gt;
&lt;a class="reference external" href="http://mail.python.org/mailman/listinfo/pypy-dev"&gt;http://mail.python.org/mailman/listinfo/pypy-dev&lt;/a&gt;&lt;/blockquote&gt;
&lt;p&gt;You need a Swiss-to-(insert country here) power adapter.  There will be
some Swiss-to-EU adapters around, and at least one EU-format power strip.&lt;/p&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/8ObYdGG1BJ8" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/1737200016169608469/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=1737200016169608469" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/1737200016169608469" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/1737200016169608469" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/8ObYdGG1BJ8/leysin-winter-sprint-20-27th-february.html" title="Leysin Winter Sprint (20-27th February 2016)" /><author><name>Armin Rigo</name><uri>http://www.blogger.com/profile/06300515270104686574</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img1.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2016/01/leysin-winter-sprint-20-27th-february.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-2652340737298251005</id><published>2015-11-19T22:01:00.000+01:00</published><updated>2015-11-19T22:01:59.863+01:00</updated><title type="text">PyPy 4.0.1 released please update</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="document" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"&gt;
&lt;div itemprop="articleBody"&gt;
&lt;div class="section" id="pypy-4-0-1" style="text-align: left;"&gt;
&lt;h1&gt;
PyPy 4.0.1&lt;/h1&gt;
&lt;br /&gt;
We have released PyPy 4.0.1, three weeks after PyPy 4.0.0. We have fixed a few critical bugs in the JIT compiled code, reported by users. We therefore encourage all users of PyPy to update to this version. There are a few minor enhancements in this version as well.&lt;br /&gt;
&lt;br /&gt;
You can download the PyPy 4.0.1 release here:&lt;br /&gt;
&lt;blockquote&gt;
&lt;div&gt;
&lt;a class="reference external" href="http://pypy.org/download.html"&gt;http://pypy.org/download.html&lt;/a&gt;&lt;/div&gt;
&lt;/blockquote&gt;
We would like to thank our donors for the continued support of the PyPy project.&lt;br /&gt;
We would also like to thank our contributors and encourage new people to join the project. PyPy has many layers and we need help with all of them: &lt;a class="reference external" href="http://doc.pypy.org/"&gt;PyPy&lt;/a&gt; and &lt;a class="reference external" href="https://rpython.readthedocs.org/"&gt;RPython&lt;/a&gt; documentation improvements, tweaking popular &lt;a class="reference external" href="http://doc.pypy.org/en/latest/project-ideas.html#make-more-python-modules-pypy-friendly"&gt;modules&lt;/a&gt; to run on pypy, or general &lt;a class="reference external" href="http://doc.pypy.org/en/latest/project-ideas.html"&gt;help&lt;/a&gt; with making RPython’s JIT even better.&lt;br /&gt;
&lt;h3&gt;
 &lt;/h3&gt;
&lt;div class="section" id="cffi"&gt;
&lt;h3&gt;
&amp;nbsp;&lt;/h3&gt;
&lt;h3&gt;
CFFI update&lt;/h3&gt;
&lt;br /&gt;
While not applicable only to PyPy, &lt;a class="reference external" href="https://cffi.readthedocs.org/"&gt;cffi&lt;/a&gt; is arguably our most significant contribution to the python ecosystem. PyPy 4.0.1 ships with &lt;a class="reference external" href="http://cffi.readthedocs.org/en/latest/whatsnew.html#v1-3-1"&gt;cffi-1.3.1&lt;/a&gt; with the improvements it brings.&lt;/div&gt;
&lt;div class="section" id="what-is-pypy"&gt;
&lt;h3 style="text-align: left;"&gt;
&amp;nbsp;&lt;/h3&gt;
&lt;h3 style="text-align: left;"&gt;
What is PyPy?&lt;/h3&gt;
&lt;br /&gt;
PyPy is a very compliant Python interpreter, almost a drop-in replacement for CPython 2.7. It’s fast (&lt;a class="reference external" href="http://speed.pypy.org/"&gt;pypy and cpython 2.7.x&lt;/a&gt; performance comparison) due to its integrated tracing JIT compiler.&lt;br /&gt;
We also welcome developers of other &lt;a class="reference external" href="http://pypyjs.org/"&gt;dynamic languages&lt;/a&gt; to see what RPython can do for them.&lt;br /&gt;
This release supports &lt;b&gt;x86&lt;/b&gt; machines on most common operating systems (Linux 32/64, Mac OS X 64, Windows 32, OpenBSD, freebsd), newer &lt;b&gt;ARM&lt;/b&gt; hardware (ARMv6 or ARMv7, with VFPv3) running Linux, and the big- and little-endian variants of &lt;b&gt;ppc64&lt;/b&gt; running Linux.&lt;/div&gt;
&lt;div class="section" id="other-highlights-since-4-0-0-released-three-weeks-ago" style="text-align: left;"&gt;
&lt;h3&gt;
&amp;nbsp;&lt;/h3&gt;
&lt;h3&gt;
Other Highlights (since 4.0.0 released three weeks ago)&lt;/h3&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;b&gt;Bug Fixes&lt;/b&gt;&lt;ul&gt;
&lt;li&gt;Fix a bug when unrolling double loops in JITted code&lt;/li&gt;
&lt;li&gt;Fix multiple memory leaks in the ssl module, one of which affected CPython as well (thanks to Alex Gaynor for pointing those out)&lt;/li&gt;
&lt;li&gt;Use pkg-config to find ssl headers on OS-X&lt;/li&gt;
&lt;li&gt;Issues reported with our previous release were &lt;a class="reference external" href="http://doc.pypy.org/en/latest/whatsnew-4.0.1.html"&gt;resolved&lt;/a&gt; after reports from users on our issue tracker at &lt;a class="reference external" href="https://bitbucket.org/pypy/pypy/issues"&gt;https://bitbucket.org/pypy/pypy/issues&lt;/a&gt; or on IRC at #pypy&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;New features&lt;/b&gt;&lt;ul&gt;
&lt;li&gt;Internal cleanup of RPython class handling&lt;/li&gt;
&lt;li&gt;Support stackless and greenlets on PPC machines&lt;/li&gt;
&lt;li&gt;Improve debug logging in subprocesses: use PYPYLOG=jit:log.%d for example to have all subprocesses write the JIT log to a file called ‘log.%d’, with ‘%d’ replaced with the subprocess’ PID.&lt;/li&gt;
&lt;li&gt;Support PyOS_double_to_string in our cpyext capi compatibility layer&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Numpy&lt;/b&gt;&lt;ul&gt;
&lt;li&gt;Improve support for __array_interface__&lt;/li&gt;
&lt;li&gt;Propagate most NAN mantissas through float16-float32-float64 conversions&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Performance improvements and refactorings&lt;/b&gt;&lt;ul&gt;
&lt;li&gt;Improvements in slicing byte arrays&lt;/li&gt;
&lt;li&gt;Improvements in enumerate()&lt;/li&gt;
&lt;li&gt;Silence some warnings while translating&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
Please update, and continue to help us make PyPy better.&lt;br /&gt;
&lt;br /&gt;
Cheers &lt;br /&gt;
The PyPy Team&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/2T26MGGDLxY" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/2652340737298251005/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=2652340737298251005" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/2652340737298251005" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/2652340737298251005" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/2T26MGGDLxY/pypy-401-released-please-update.html" title="PyPy 4.0.1 released please update" /><author><name>mattip</name><uri>http://www.blogger.com/profile/07336549270776418081</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img1.blogblog.com/img/b16-rounded.gif" /></author><thr:total>8</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2015/11/pypy-401-released-please-update.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-8282134928733384063</id><published>2015-10-29T13:17:00.001+01:00</published><updated>2015-10-29T13:17:46.389+01:00</updated><title type="text">PyPy 4.0.0 Released - A Jit with SIMD Vectorization and More</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h1&gt;
PyPy 4.0.0&lt;/h1&gt;
We’re pleased and proud to unleash PyPy 4.0.0, a major update of the PyPy python 2.7.10 compatible interpreter with a Just In Time compiler. We have improved &lt;a class="reference external" href="http://morepypy.blogspot.com/2015/10/pypy-memory-and-warmup-improvements-2.html"&gt;warmup time and memory overhead used for tracing&lt;/a&gt;, added &lt;a class="reference external" href="http://pypyvecopt.blogspot.co.at/"&gt;vectorization&lt;/a&gt; for numpy and general loops where possible on x86 hardware (disabled by default), refactored rough edges in rpython, and increased functionality of numpy.&lt;br /&gt;
You can download the PyPy 4.0.0 release here:&lt;br /&gt;
&lt;blockquote&gt;
&lt;div&gt;
&lt;a class="reference external" href="http://pypy.org/download.html"&gt;http://pypy.org/download.html&lt;/a&gt;&lt;/div&gt;
&lt;/blockquote&gt;
We would like to thank our donors for the continued support of the PyPy project.&lt;br /&gt;
We would also like to thank our contributors (7 new ones since PyPy 2.6.0) and encourage new people to join the project. PyPy has many layers and we need help with all of them: &lt;a class="reference external" href="http://doc.pypy.org/"&gt;PyPy&lt;/a&gt; and &lt;a class="reference external" href="https://rpython.readthedocs.org/"&gt;RPython&lt;/a&gt; documentation improvements, tweaking popular &lt;a class="reference external" href="http://doc.pypy.org/en/latest/project-ideas.html#make-more-python-modules-pypy-friendly"&gt;modules&lt;/a&gt; to run on PyPy, or general &lt;a class="reference external" href="http://doc.pypy.org/en/latest/project-ideas.html"&gt;help&lt;/a&gt; with making RPython’s JIT even better.&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style="text-align: center;"&gt;
New Version Numbering&lt;/h3&gt;
&lt;br /&gt;
&lt;div class="section" id="new-version-numbering"&gt;
Since the past release, PyPy 2.6.1, we decided to update the PyPy 2.x.x versioning directly to PyPy 4.x.x, to avoid confusion with CPython 2.7 and 3.5. Note that this version of PyPy uses the stdlib and implements the syntax of CPython 2.7.10.&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: center;"&gt;
Vectorization&lt;/h3&gt;
&lt;br /&gt;
&lt;div class="section" id="vectorization"&gt;
Richard Plangger began work in March and continued over a Google Summer of Code to add a&lt;a href="http://pypyvecopt.blogspot.co.at/"&gt; &lt;cite&gt;vectorization&lt;/cite&gt;&lt;/a&gt; step to the trace optimizer. The step recognizes common constructs and emits SIMD code where possible, much as any modern compiler does. This vectorization happens while tracing running code,  so it is actually easier at run-time to determine the availability of possible vectorization than it is for ahead-of-time compilers.&lt;br /&gt;
Availability of SIMD hardware is detected at run time, without needing to precompile various code paths into the executable.&lt;br /&gt;
The first version of the vectorization has been merged in this release, since it is so new it is off by default. To enable the vectorization in built-in JIT drivers (like numpy ufuncs), add &lt;cite&gt;–jit vec=1&lt;/cite&gt;, to enable all implemented vectorization add &lt;cite&gt;–jit vec_all=1&lt;/cite&gt;&lt;br /&gt;
Benchmarks and a summary of this work appear &lt;a class="reference external" href="http://morepypy.blogspot.com/2015/10/automatic-simd-vectorization-support-in.html"&gt;here&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style="text-align: center;"&gt;
Internal Refactoring: Warmup Time Improvement and Reduced Memory Usage&lt;/h3&gt;
&lt;br /&gt;
&lt;div class="section" id="internal-refactoring-and-warmup-time-improvement"&gt;
Maciej Fijalkowski and Armin Rigo refactored internals of &lt;cite&gt;&lt;/cite&gt;Rpython that now allow PyPy to more efficiently use &lt;a class="reference external" href="http://rpython.readthedocs.org/en/latest/glossary.html"&gt;guards&lt;/a&gt; in jitted code. They also rewrote unrolling, leading to a warmup time improvement of 20% or so. The reduction in guards also means a reduction in the use of memory, also a savings of around 20%.&lt;/div&gt;
&lt;div class="section" id="numpy"&gt;
&lt;br /&gt;
&lt;h3 style="text-align: center;"&gt;
Numpy&lt;/h3&gt;
&lt;br /&gt;
Our implementation of &lt;a class="reference external" href="https://bitbucket.org/pypy/numpy"&gt;numpy&lt;/a&gt; continues to improve. ndarray and the numeric dtypes are very close to feature-complete; record, string and unicode dtypes are mostly supported.  We have reimplemented numpy linalg, random and fft as cffi-1.0 modules that call out to the same underlying libraries that upstream numpy uses. Please try it out, especially using the new vectorization (via &lt;cite&gt;–jit vec=1&lt;/cite&gt; on the command line) and let us know what is missing for your code.&lt;/div&gt;
&lt;div class="section" id="cffi"&gt;
&lt;br /&gt;
&lt;h3 style="text-align: center;"&gt;
CFFI&lt;/h3&gt;
&lt;br /&gt;
While not applicable only to PyPy, &lt;a class="reference external" href="https://cffi.readthedocs.org/"&gt;cffi&lt;/a&gt; is arguably our most significant contribution to the python ecosystem. Armin Rigo continued improving it, and PyPy reaps the benefits of &lt;a class="reference external" href="http://cffi.readthedocs.org/en/latest/whatsnew.html#v1-3-0"&gt;cffi-1.3&lt;/a&gt;: improved manangement of object lifetimes, __stdcall on Win32, ffi.memmove(), and percolate &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;const&lt;/span&gt;&lt;/code&gt;, &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;restrict&lt;/span&gt;&lt;/code&gt; keywords from cdef to C code.&lt;/div&gt;
&lt;div class="section" id="what-is-pypy"&gt;
&lt;br /&gt;
&lt;h3 style="text-align: center;"&gt;
What is PyPy?&lt;/h3&gt;
&lt;br /&gt;
PyPy is a very compliant Python interpreter, almost a drop-in replacement for CPython 2.7. It’s fast (&lt;a class="reference external" href="http://speed.pypy.org/"&gt;pypy and cpython 2.7.x&lt;/a&gt; performance comparison) due to its integrated tracing JIT compiler.&lt;br /&gt;
We also welcome developers of other &lt;a class="reference external" href="http://pypyjs.org/"&gt;dynamic languages&lt;/a&gt; to see what RPython can do for them.&lt;br /&gt;
This release supports &lt;b&gt;x86&lt;/b&gt; machines on most common operating systems (Linux 32/64, Mac OS X 64, Windows 32, &lt;a class="reference external" href="http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/lang/pypy"&gt;OpenBSD&lt;/a&gt;, &lt;a class="reference external" href="https://svnweb.freebsd.org/ports/head/lang/pypy/"&gt;freebsd&lt;/a&gt;), as well as newer &lt;b&gt;ARM&lt;/b&gt; hardware (ARMv6 or ARMv7, with VFPv3) running Linux.&lt;br /&gt;
We also introduce &lt;a class="reference external" href="http://morepypy.blogspot.com/2015/10/powerpc-backend-for-jit.html"&gt;support for the 64 bit PowerPC&lt;/a&gt; hardware, specifically Linux running the big- and little-endian variants of ppc64.&lt;/div&gt;
&lt;div class="section" id="other-highlights-since-2-6-1-release-two-months-ago"&gt;
&lt;h3 style="text-align: center;"&gt;
Other Highlights (since 2.6.1 release two months ago)&lt;/h3&gt;
&lt;ul class="simple" style="text-align: left;"&gt;
&lt;li&gt;&lt;b&gt;Bug Fixes&lt;/b&gt;&lt;ul&gt;
&lt;li&gt;Applied OPENBSD downstream fixes&lt;/li&gt;
&lt;li&gt;Fix a crash on non-linux when running more than 20 threads&lt;/li&gt;
&lt;li&gt;In cffi, ffi.new_handle() is more cpython compliant&lt;/li&gt;
&lt;li&gt;Accept unicode in functions inside the _curses cffi backend exactly like cpython&lt;/li&gt;
&lt;li&gt;Fix a segfault in itertools.islice()&lt;/li&gt;
&lt;li&gt;Use gcrootfinder=shadowstack by default, asmgcc on linux only&lt;/li&gt;
&lt;li&gt;Fix ndarray.copy() for upstream compatability when copying non-contiguous arrays&lt;/li&gt;
&lt;li&gt;Fix assumption that lltype.UniChar is unsigned&lt;/li&gt;
&lt;li&gt;Fix a subtle bug with stacklets on shadowstack&lt;/li&gt;
&lt;li&gt;Improve support for the cpython capi in cpyext (our capi compatibility layer). Fixing these issues inspired some thought about cpyext in general, stay tuned for more improvements&lt;/li&gt;
&lt;li&gt;When loading dynamic libraries, in case of a certain loading error, retry loading the library assuming it is actually a linker script, like on Arch and Gentoo&lt;/li&gt;
&lt;li&gt;Issues reported with our previous release were &lt;a class="reference external" href="http://doc.pypy.org/en/latest/whatsnew-15.11.0.html"&gt;resolved&lt;/a&gt; after reports from users on our issue tracker at &lt;a class="reference external" href="https://bitbucket.org/pypy/pypy/issues"&gt;https://bitbucket.org/pypy/pypy/issues&lt;/a&gt; or on IRC at #pypy&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;New features&lt;/b&gt;:&lt;ul&gt;
&lt;li&gt;Add an optimization pass to vectorize loops using x86 SIMD intrinsics.&lt;/li&gt;
&lt;li&gt;Support __stdcall on Windows in CFFI&lt;/li&gt;
&lt;li&gt;Improve debug logging when using PYPYLOG=???&lt;/li&gt;
&lt;li&gt;Deal with platforms with no RAND_egd() in OpenSSL&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Numpy&lt;/b&gt;:&lt;ul&gt;
&lt;li&gt;Add support for ndarray.ctypes&lt;/li&gt;
&lt;li&gt;Fast path for mixing numpy scalars and floats&lt;/li&gt;
&lt;li&gt;Add support for creating Fortran-ordered ndarrays&lt;/li&gt;
&lt;li&gt;Fix casting failures in linalg (by extending ufunc casting)&lt;/li&gt;
&lt;li&gt;Recognize and disallow (for now) pickling of ndarrays with objects embedded in them&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Performance improvements and refactorings&lt;/b&gt;:&lt;ul class="simple"&gt;
&lt;li&gt;Reuse hashed keys across dictionaries and sets&lt;/li&gt;
&lt;li&gt;Refactor JIT interals to improve warmup time by 20% or so at the cost of a minor regression in JIT speed&lt;/li&gt;
&lt;li&gt;Recognize patterns of common sequences in the JIT backends and optimize them&lt;/li&gt;
&lt;li&gt;Make the garbage collecter more incremental over external_malloc() calls&lt;/li&gt;
&lt;li&gt;Share guard resume data where possible which reduces memory usage&lt;/li&gt;
&lt;li&gt;Fast path for zip(list, list)&lt;/li&gt;
&lt;li&gt;Reduce the number of checks in the JIT for lst[a:]&lt;/li&gt;
&lt;li&gt;Move the non-optimizable part of callbacks outside the JIT&lt;/li&gt;
&lt;li&gt;Factor in field immutability when invalidating heap information&lt;/li&gt;
&lt;li&gt;Unroll itertools.izip_longest() with two sequences&lt;/li&gt;
&lt;li&gt;Minor optimizations after analyzing output from &lt;a class="reference external" href="https://vmprof.readthedocs.org/"&gt;vmprof&lt;/a&gt; and trace logs&lt;/li&gt;
&lt;li&gt;Remove many class attributes in rpython classes&lt;/li&gt;
&lt;li&gt;Handle getfield_gc_pure* and getfield_gc_* uniformly in heap.py&lt;/li&gt;
&lt;li&gt;Improve simple trace function performance by lazily calling fast2locals and locals2fast only if truly necessary &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="document" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"&gt;
&lt;div itemprop="articleBody"&gt;
&lt;div class="section" id="pypy-4-0-0"&gt;
&lt;div class="section" id="other-highlights-since-2-6-1-release-two-months-ago"&gt;
Please try it out and let us know what you think. We welcome feedback, we know you are using PyPy, please tell us about it!&lt;br /&gt;
Cheers&lt;br /&gt;
The PyPy Team&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;footer&gt;        &lt;div class="rst-footer-buttons" role="navigation"&gt;
&lt;/div&gt;
&lt;/footer&gt;                       &lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/owtOMt9-xr4" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/8282134928733384063/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=8282134928733384063" title="19 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/8282134928733384063" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/8282134928733384063" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/owtOMt9-xr4/pypy-400-released-jit-with-simd.html" title="PyPy 4.0.0 Released - A Jit with SIMD Vectorization and More" /><author><name>mattip</name><uri>http://www.blogger.com/profile/07336549270776418081</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img1.blogblog.com/img/b16-rounded.gif" /></author><thr:total>19</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2015/10/pypy-400-released-jit-with-simd.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-639063580401330508</id><published>2015-10-20T15:38:00.000+02:00</published><updated>2015-10-21T09:21:42.837+02:00</updated><title type="text">Automatic SIMD vectorization support in PyPy</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Hi everyone,&lt;br /&gt;
&lt;br /&gt;
it took some time to catch up with the JIT refacrtorings merged in this summer. &lt;span style="font-size: small;"&gt;But, (drums) we are happy to announce that:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style="text-align: center;"&gt;
&lt;span style="font-size: large;"&gt;The next release of PyPy,&amp;nbsp; "PyPy 4.0.0", will ship the new auto vectorizer&lt;/span&gt;&lt;/h2&gt;
&lt;span style="font-size: small;"&gt;The goal of this project was to increase the speed of numerical applications in both the NumPyPy library and for arbitrary Python programs. In PyPy we have focused a lot on improvements in the 'typical python workload',  which usually involves object and string manipulations, mostly for web development. We're hoping with this work that we'll continue improving the other very important Python use case - numerics.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span style="font-size: small;"&gt;&lt;span style="font-size: large;"&gt;What it can do!&lt;/span&gt; &lt;/span&gt;&lt;/h2&gt;
&lt;span style="font-size: small;"&gt;It targets numerics only. It 
will not execute object manipulations faster, but it is capable of 
enhancing common vector and matrix operations.&lt;/span&gt;&lt;br /&gt;
Good news is that it is not specifically targeted for the NumPy library and the PyPy 
virtual machine. Any interpreter (written in RPython) is able make use 
of the vectorization. For more information about that take a look &lt;a href="http://pypyvecopt.blogspot.co.at/"&gt;here&lt;/a&gt;, or consult the documentation. For the time being it is not turn on by default, so be sure to enable it by specifying &lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;--jit vec=1&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;before running your program.&lt;br /&gt;
&lt;br /&gt;
If your language (written in RPython) contains many array/matrix operations, you can easily integrate the optimization by adding the parameter 'vec=1' to the JitDriver.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span style="font-size: large;"&gt;NumPyPy Improvements&lt;/span&gt;&lt;/h2&gt;
&lt;span style="font-size: small;"&gt;&lt;/span&gt;
&lt;span style="font-size: small;"&gt;Let's take a look at the core functions of the NumPyPy library (*). &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;The following tests tests show the speedup of the core functions commonly used in Python code interfacing with NumPy, on CPython with NumPy, on the PyPy 2.6.1 relased several weeks ago, and on PyPy 15.11 to be released soon. Timeit was used to test the time needed to run the operation in the plot title on various vector (lower case) and square matrix (upper case) sizes displayed on the X axis. The Y axis shows the speedup compared to CPython 2.7.10. &lt;b&gt;This means that higher is better&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-aqC2wMdVRaU/ViUZJYlUNoI/AAAAAAAAAXQ/FGa9DfdDZ-4/s1600/matrix-vector.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="353" src="http://3.bp.blogspot.com/-aqC2wMdVRaU/ViUZJYlUNoI/AAAAAAAAAXQ/FGa9DfdDZ-4/s640/matrix-vector.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;span style="font-size: small;"&gt;In comparison to PyPy 2.6.1, the speedup &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-size: small;"&gt;greatly&lt;/span&gt; improved. The hardware support really strips down the runtime of the vector and matrix operations. There is another operation we would like to highlight: the dot product.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;It is a very common operation in numerics and PyPy now (given a moderate sized matrix and vector) decreases the time spent in that operation. See for yourself:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-TMuz6OUEOXU/ViUZWEng4AI/AAAAAAAAAXY/dZOYp1LO1G0/s1600/dotproduct.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="353" src="http://3.bp.blogspot.com/-TMuz6OUEOXU/ViUZWEng4AI/AAAAAAAAAXY/dZOYp1LO1G0/s640/dotproduct.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
These are nice improvements in the NumPyPy library and we got to a competitive level only making use of SSE4.1.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span style="font-size: large;"&gt;Future work&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/h2&gt;
&lt;br /&gt;
&lt;span style="font-size: small;"&gt;This is not the end of the road. The GSoC project showed that it is possible to implement this optimization in PyPy. There might be other improvements we can make to carry this further:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;Check alignment at runtime to increase the memory throughput of the CPU&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;Support the AVX vector extension which (at least) doubles the size of the vector register&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;Handle each and every corner case in Python traces to enable it&amp;nbsp; globally&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;Do not rely only on loading operations to trigger the analysis, there might be cases where combination of floating point values could be done in parallel &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
Cheers,&lt;br /&gt;
The PyPy Team&lt;br /&gt;
&lt;h4&gt;
&lt;span style="font-size: x-small;"&gt;(*) The benchmark code can be found &lt;a href="https://bitbucket.org/plan_rich/numpy-benchmark"&gt;here&lt;/a&gt; it was run using this configuration: i7-2600 CPU @ 3.40GHz (4 cores). &lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/uyCJg-EPdek" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/639063580401330508/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=639063580401330508" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/639063580401330508" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/639063580401330508" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/uyCJg-EPdek/automatic-simd-vectorization-support-in.html" title="Automatic SIMD vectorization support in PyPy" /><author><name>Richard Plangger</name><uri>https://plus.google.com/114742728940931060202</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-fzm2oAI4Fmk/AAAAAAAAAAI/AAAAAAAAAZM/8rpCwmkysf4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-aqC2wMdVRaU/ViUZJYlUNoI/AAAAAAAAAXQ/FGa9DfdDZ-4/s72-c/matrix-vector.png" height="72" width="72" /><thr:total>5</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2015/10/automatic-simd-vectorization-support-in.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3971202189709462152.post-3014100267884692148</id><published>2015-10-16T18:08:00.000+02:00</published><updated>2015-10-16T18:08:53.674+02:00</updated><title type="text">PowerPC backend for the JIT</title><content type="html">&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;PyPy's JIT now supports the 64-bit PowerPC architecture!  This is the
third architecture supported, in addition to x86 (32 and 64) and ARM
(32-bit only).  More precisely, we support Linux running the big- and the
little-endian variants of ppc64.  Thanks to IBM for funding this work!&lt;/p&gt;

&lt;p&gt;The new JIT backend has been merged into "default".  You should be able
to translate PPC versions
&lt;a href="http://pypy.org/download.html#building-from-source"&gt;as usual&lt;/a&gt;
directly on the machines.  For
the foreseeable future, I will compile and distribute binary versions
corresponding to the official releases (for Fedora), but of course I'd
welcome it if someone else could step in and do it.  Also, it is unclear
yet if we will run a buildbot.&lt;/p&gt;

&lt;p&gt;To check that the result performs well, I logged in a ppc64le machine
and ran the usual benchmark suite of PyPy (minus sqlitesynth: sqlite
was not installed on that machine).  I ran it twice at a difference of
12 hours, as an attempt to reduce risks caused by other users suddenly
using the machine.  The machine was overall relatively quiet.  Of
course, this is scientifically not good enough; it is what I could come
up with given the limited resources.&lt;/p&gt;

&lt;p&gt;Here are the results, where the numbers are speed-up factors between the
non-jit and the jit version of PyPy.  The first column is x86-64, for
reference.  The second and third columns are the two ppc64le runs.  All
are Linux.  A few benchmarks are not reported here because the runner
doesn't execute them on non-jit (however, apart from sqlitesynth, they
all worked).&lt;/p&gt;

&lt;pre&gt;
    ai                        13.7342        16.1659     14.9091
    bm_chameleon               8.5944         8.5858        8.66
    bm_dulwich_log             5.1256         5.4368      5.5928
    bm_krakatau                5.5201         2.3915      2.3452
    bm_mako                    8.4802         6.8937      6.9335
    bm_mdp                     2.0315         1.7162      1.9131
    chaos                     56.9705        57.2608     56.2374
    sphinx
    crypto_pyaes               62.505         80.149     79.7801
    deltablue                  3.3403         5.1199      4.7872
    django                    28.9829         23.206       23.47
    eparse                     2.3164         2.6281       2.589
    fannkuch                   9.1242        15.1768     11.3906
    float                     13.8145        17.2582     17.2451
    genshi_text               16.4608        13.9398     13.7998
    genshi_xml                 8.2782         8.0879      9.2315
    go                         6.7458        11.8226     15.4183
    hexiom2                   24.3612        34.7991     33.4734
    html5lib                   5.4515         5.5186       5.365
    json_bench                28.8774        29.5022     28.8897
    meteor-contest             5.1518         5.6567      5.7514
    nbody_modified            20.6138        22.5466     21.3992
    pidigits                   1.0118          1.022      1.0829
    pyflate-fast               9.0684        10.0168     10.3119
    pypy_interp                3.3977         3.9307      3.8798
    raytrace-simple           69.0114       108.8875    127.1518
    richards                  94.1863       118.1257    102.1906
    rietveld                   3.2421         3.0126      3.1592
    scimark_fft
    scimark_lu
    scimark_montecarlo
    scimark_sor
    scimark_sparsematmul
    slowspitfire               2.8539         3.3924      3.5541
    spambayes                  5.0646         6.3446       6.237
    spectral-norm             41.9148        42.1831     43.2913
    spitfire                   3.8788         4.8214       4.701
    spitfire_cstringio          7.606         9.1809      9.1691
    sqlitesynth
    sympy_expand               2.9537         2.0705      1.9299
    sympy_integrate            4.3805         4.3467      4.7052
    sympy_str                  1.5431         1.6248      1.5825
    sympy_sum                  6.2519          6.096      5.6643
    telco                     61.2416        54.7187     55.1705
    trans2_annotate
    trans2_rtype
    trans2_backendopt
    trans2_database
    trans2_source
    twisted_iteration         55.5019        51.5127     63.0592
    twisted_names              8.2262         9.0062      10.306
    twisted_pb                12.1134         13.644     12.1177
    twisted_tcp                4.9778          1.934      5.4931

    GEOMETRIC MEAN               9.31           9.70       10.01
&lt;/pre&gt;

&lt;p&gt;The last line reports the geometric mean of each column.  We see that
the goal was reached: PyPy's JIT actually improves performance by a
factor of around 9.7 to 10 times on ppc64le.  By comparison, it "only"
improves performance by a factor 9.3 on Intel x86-64.  I don't know why,
but I'd guess it mostly means that a non-jitted PyPy performs slightly
better on Intel than it does on PowerPC.&lt;/p&gt;

&lt;p&gt;Why is that?  Actually, if we do the same comparison with an ARM
column too, we also get higher numbers there than on Intel.
When we discovered that a few years ago, we guessed that
on ARM running the whole interpreter in
PyPy takes up a lot of resources, e.g. of instruction cache, which the
JIT's assembler doesn't need any more after the process is warmed up.
And caches are much bigger on Intel.  However, PowerPC is much closer
to Intel, so this argument doesn't work for PowerPC.
But there are other more subtle
variants of it.  Notably, Intel is doing crazy things about branch
prediction, which likely helps a big interpreter---both the non-JITted
PyPy and CPython, and both for the interpreter's main loop itself and
for the numerous indirect branches that depend on the types of the
objects.  Maybe the PowerPC is as good as Intel, and so this argument
doesn't work either.  Another one would be:
on PowerPC I did notice that gcc itself is not
perfect at optimization.  During development of this backend, I often
looked at assembler produced by gcc, and there are a number of small
inefficiencies there.  All these are factors that slow down the
non-JITted version of PyPy, but don't influence the speed of the
assembler produced just-in-time.&lt;/p&gt;

&lt;p&gt;Anyway, this is just guessing.  The fact remains that PyPy can now
be used on PowerPC machines.  Have fun!&lt;/p&gt;

&lt;p&gt;A bientôt,&lt;/p&gt;

&lt;p&gt;Armin.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/zZhhdYjGhg0" height="1" width="1" alt=""/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/3014100267884692148/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=3014100267884692148" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/3014100267884692148" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/3014100267884692148" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/zZhhdYjGhg0/powerpc-backend-for-jit.html" title="PowerPC backend for the JIT" /><author><name>Armin Rigo</name><uri>http://www.blogger.com/profile/06300515270104686574</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img1.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2015/10/powerpc-backend-for-jit.html</feedburner:origLink></entry></feed>
