<?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/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CUIFSHs4eyp7ImA9WxBTEU8.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152</id><updated>2009-12-06T19:18:39.533+01:00</updated><title>PyPy Status Blog</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://morepypy.blogspot.com/" /><link rel="hub" href="http://pubsubhubbub.appspot.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&amp;v=2" /><author><name>Carl Friedrich Bolz</name><uri>http://www.blogger.com/profile/00518922641059511014</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>117</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><link rel="self" href="http://feeds.feedburner.com/PyPyStatusBlog" type="application/atom+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry gd:etag="W/&quot;A0MNR3YzeSp7ImA9WxNaGEg.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-7768876505015446348</id><published>2009-12-02T13:31:00.009+01:00</published><updated>2009-12-03T17:58:16.881+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-03T17:58:16.881+01:00</app:edited><title>Leysin Winter Sprint: 23-30th January 2010 (?)</title><content type="html">&lt;table border="0"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;

&lt;p&gt;&lt;b&gt;Update:&lt;/b&gt; the sprint &lt;b&gt;may be moved&lt;/b&gt; to some later date!&lt;/p&gt;

The next PyPy sprint will be in Leysin, Switzerland, for the
seventh time.  This is a fully public sprint: newcomers and topics
other than those proposed below are welcome.

&lt;/td&gt;&lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/td&gt;&lt;td&gt;
&lt;img src="http://www.ermina.ch/003.JPG" /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;h2&gt;Goals and topics of the sprint&lt;/h2&gt;

&lt;ul&gt;&lt;li&gt;
  The main idea of the sprint is to prepare the upcoming release of PyPy.
  This means mostly JIT or JIT-related work.  It is a bit hard to be more
  precise right now, because it depends on how much is left to do in the
  core JIT.  So work will be focused either on the JIT itself or on "make
  this or that feature of PyPy more JIT-friendly".  Of course, as usual,
  we are ready to add any other task -- please mention on the mailing
  list what you would like to work on; the list of task is not really fixed.

&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;/ul&gt;

&lt;h2&gt;Exact times&lt;/h2&gt;

&lt;p&gt;The sprint &lt;b&gt;may be moved&lt;/b&gt; to some later date!&lt;/p&gt;

&lt;h2&gt;Location &amp;amp; Accomodation&lt;/h2&gt;

&lt;p&gt;Leysin, Switzerland, "same place as before".  Let me refresh your
memory: both the sprint venue and the lodging will be in a very spacious
&lt;a href="http://www.ermina.ch/"&gt;pair of chalets&lt;/a&gt; built specifically
 for bed &amp;amp; breakfast.  The place has a good ADSL Internet connexion
with wireless installed.  You can of course arrange your own
lodging anywhere (so long as you are in Leysin, you cannot be more than a
15 minutes walk away from the sprint venue), but I definitely recommend
lodging there too -- you won't find a better view anywhere else (though you
probably won't get much worse ones easily, either :-)&lt;/p&gt;

&lt;p&gt;Please &lt;b&gt;confirm&lt;/b&gt; that you are coming so that we can adjust the reservations
as appropriate.  The rate so far has been around 60 CHF a night all included
in 2-person rooms, with breakfast.  There are larger rooms too (less
expensive) and maybe the possibility to get a single room if you really want
to.&lt;/p&gt;

&lt;p&gt;Please register &lt;a href="http://codespeak.net/svn/pypy/extradoc/sprintinfo/leysin-winter-2010/people.txt"&gt;by svn&lt;/a&gt; or on the &lt;a href="http://codespeak.net/mailman/listinfo/pypy-sprint"&gt;pypy-sprint&lt;/a&gt; mailing list if you do not yet have check-in rights.

&lt;p&gt;You need a Swiss-to-(insert country here) power adapter.  There will be
some Swiss-to-EU adapters around -- bring a EU-format power strip if you
have one.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-7768876505015446348?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/HVCeq1_SINM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/7768876505015446348/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=7768876505015446348" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/7768876505015446348?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/7768876505015446348?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/HVCeq1_SINM/leysin-winter-sprint-23-30th-january.html" title="Leysin Winter Sprint: 23-30th January 2010 (?)" /><author><name>Armin Rigo</name><uri>http://www.blogger.com/profile/06300515270104686574</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="12163836270373797954" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/12/leysin-winter-sprint-23-30th-january.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEMEQH84eyp7ImA9WxNaFUU.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-4951018896657992031</id><published>2009-11-30T12:19:00.004+01:00</published><updated>2009-11-30T14:06:41.133+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-30T14:06:41.133+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PyQt4" /><category scheme="http://www.blogger.com/atom/ns#" term="CPython" /><category scheme="http://www.blogger.com/atom/ns#" term="extension modules" /><category scheme="http://www.blogger.com/atom/ns#" term="RPyC" /><title>Using CPython extension modules with PyPy, or: PyQt on PyPy</title><content type="html">&lt;div class="document" id="using-cpython-extension-modules-with-pypy-or-pyqt-on-pypy"&gt;

&lt;p&gt;If you have ever wanted to use CPython extension modules on PyPy,
we want to announce that there is a solution that should be compatible
to quite a bit of the available modules. It is neither new nor written
by us, but works nevertheless great with PyPy.&lt;/p&gt;
&lt;p&gt;The trick is to use RPyC, a transparent, symmetric remote procedure
call library written in Python. The idea is to start a
CPython process that hosts the PyQt libraries
and connect to it via TCP to send RPC commands to it.&lt;/p&gt;
&lt;p&gt;I tried to run PyQt applications
using it on PyPy and could get quite a bit of the functionality of these
working. Remaining problems include regular segfaults of CPython
because of PyQt-induced memory corruption and bugs because classes
like StandardButtons behave incorrectly when it comes to arithmetical operations.&lt;/p&gt;
&lt;p&gt;Changes to RPyC needed to be done to support remote unbound &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;__init__&lt;/span&gt;&lt;/tt&gt; methods,
shallow call by value for list and dict types (PyQt4 methods want real lists and dicts
as parameters), and callbacks to methods (all remote method objects are wrapped into
small lambda functions to ease the call for PyQt4).&lt;/p&gt;
&lt;p&gt;If you want to try RPyC to run the PyQt application of your choice, you just
need to follow these steps. Please report your experience here in the blog
comments or on our &lt;a class="reference external" href="http://codespeak.net/mailman/listinfo/pypy-dev"&gt;mailing list&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Download RPyC from the &lt;a class="reference external" href="http://sourceforge.net/projects/rpyc/files/"&gt;RPyC download page&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Download this &lt;a class="reference external" href="http://codespeak.net/svn/user/xoraxax/rpyc-3.0.7-pyqt4-compat.patch"&gt;patch&lt;/a&gt; and apply it to RPyC by running
&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;patch&lt;/span&gt; &lt;span class="pre"&gt;-p1&lt;/span&gt; &lt;span class="pre"&gt;&amp;lt;&lt;/span&gt; &lt;span class="pre"&gt;rpyc-3.0.7-pyqt4-compat.patch&lt;/span&gt;&lt;/tt&gt; in the RPyC directory.&lt;/li&gt;
&lt;li&gt;Install RPyc by running &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;python&lt;/span&gt; &lt;span class="pre"&gt;setup.py&lt;/span&gt; &lt;span class="pre"&gt;install&lt;/span&gt;&lt;/tt&gt; as root.&lt;/li&gt;
&lt;li&gt;Run the file &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;rpyc/servers/classic_server.py&lt;/span&gt;&lt;/tt&gt; using CPython.&lt;/li&gt;
&lt;li&gt;Execute your PyQt application on PyPy.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;PyPy will automatically connect to CPython and use its PyQt libraries.&lt;/p&gt;
&lt;p&gt;Note that this scheme works with nearly every extension library. Look
at &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;pypy/lib/sip.py&lt;/span&gt;&lt;/tt&gt; on how to add new libraries (you need to create
such a file for every proxied extension module).&lt;/p&gt;
&lt;p&gt;Have fun with PyQt&lt;/p&gt;
&lt;p&gt;Alexander Schremmer&lt;/p&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-4951018896657992031?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/BOwpVK8dOOk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/4951018896657992031/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=4951018896657992031" title="10 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/4951018896657992031?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/4951018896657992031?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/BOwpVK8dOOk/using-cpython-extension-modules-with.html" title="Using CPython extension modules with PyPy, or: PyQt on PyPy" /><author><name>Alexander Schremmer</name><uri>http://www.blogger.com/profile/08851437269223332169</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="04228276313325293491" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">10</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/11/using-cpython-extension-modules-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcFRXs7cSp7ImA9WxNaFUo.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-9211261260383281459</id><published>2009-11-18T22:53:00.003+01:00</published><updated>2009-11-30T11:13:34.509+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-30T11:13:34.509+01:00</app:edited><title>Some benchmarking</title><content type="html">Hello.
&lt;p&gt;
Recently, thanks to the surprisingly helpful Unhelpful, also known as Andrew Mahone,
we have a decent, if slightly arbitrary, set of performances graphs.
It contains a couple of benchmarks already
seen on this blog as well as some taken from &lt;a href="http://shootout.alioth.debian.org/"&gt;The Great Computer
Language Benchmarks Game&lt;/a&gt;. These benchmarks don't even try to represent "real applications"
as they're mostly small algorithmic benchmarks. Interpreters used:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
PyPy trunk, revision 69331 with --translation-backendopt-storesink, which is
now on by default
&lt;/li&gt;
&lt;li&gt;
Unladen swallow trunk, r900
&lt;/li&gt;
&lt;li&gt;CPython 2.6.2 release&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Here are the graphs; the benchmarks and the runner script are &lt;a href="http://www.looking-glass.us/~chshrcat/python-benchmarks/"&gt;available&lt;/a&gt;
&lt;/p&gt;

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5R1EBmwBBTs/SwRteBYi01I/AAAAAAAAAOU/BU3h_VUfmH0/s1600/result.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_5R1EBmwBBTs/SwRteBYi01I/AAAAAAAAAOU/BU3h_VUfmH0/s400/result.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5405565815286322002" /&gt;&lt;/a&gt;

And zoomed in for all benchmarks except binary-trees and fannkuch.
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5R1EBmwBBTs/SwRtnxYPJII/AAAAAAAAAOc/JAvE6pYaEjI/s1600/result2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_5R1EBmwBBTs/SwRtnxYPJII/AAAAAAAAAOc/JAvE6pYaEjI/s400/result2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5405565982788756610" /&gt;&lt;/a&gt;

&lt;p&gt;
As we can see, PyPy is generally somewhere between the same speed
as CPython to 50x faster (f1int). The places where we're the same
speed as CPython are places where we know we have problems - for example generators are
not sped up by the JIT and they require some work (although not as much by far
as generators &amp; Psyco :-). The glaring inefficiency is in the regex-dna benchmark.
This one clearly demonstrates that our regular expression engine is really,
really, bad and urgently requires attention.
&lt;/p&gt;
&lt;p&gt;
The cool thing here is, that although these benchmarks might not represent
typical python applications, they're not uninteresting. They show
that algorithmic code does not need to be far slower in Python than in C,
so using PyPy one need not worry about algorithmic code being dramatically
slow. As many readers would agree, that kills yet another usage of C in our
lives :-)
&lt;/p&gt;
Cheers,&lt;br/&gt;
fijal&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-9211261260383281459?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/ex-_txgtiWY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/9211261260383281459/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=9211261260383281459" title="31 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/9211261260383281459?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/9211261260383281459?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/ex-_txgtiWY/some-benchmarking.html" title="Some benchmarking" /><author><name>Maciej Fijalkowski</name><uri>http://www.blogger.com/profile/11410841070239382771</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15356769323900246609" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_5R1EBmwBBTs/SwRteBYi01I/AAAAAAAAAOU/BU3h_VUfmH0/s72-c/result.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">31</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/11/some-benchmarking.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEMARnkzfip7ImA9WxNbEUw.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-2505348213879053352</id><published>2009-11-13T13:46:00.000+01:00</published><updated>2009-11-13T13:47:27.786+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-13T13:47:27.786+01:00</app:edited><title>Düsseldorf Sprint Report</title><content type="html">&lt;p&gt;While the Düsseldorf is dwindling off, we put our minds to the task of retelling
our accomplishments. The sprint was mostly about improving the JIT and we         
managed to stick to that task (as much as we managed to stick to anything). The   
sprint was mostly filled with doing many small things.&lt;/p&gt;                        
&lt;div class="section" id="inlining"&gt;                                               
&lt;h2&gt;Inlining&lt;/h2&gt;                                                                 
&lt;p&gt;Carl Friedrich and Samuele started the sprint trying to tame the JIT's inlining.
Until now, the JIT would try to inline everything in a loop (except other loops)  
which is what most tracing JITs actually do. This works great if the resulting    
trace is of reasonable length, but if not it would result in excessive memory     
consumption and code cache problems in the CPU. So far we just had a limit on     
the trace size, and we would abort tracing when the limit was reached. This       
would happen again and again for the same loop, which is not useful at all. The   
new approach introduced is to be more clever when tracing is aborted by marking   
the function with the largest contribution to the trace size as non-inlinable. The
next time this loop is traced, it usually then gives a reasonably sized trace.&lt;/p&gt;
&lt;p&gt;This gives a problem because now some functions that don't contain loops are not
inlined, which means they never get assembler code for them generated. To remedy  
this problem we also make it possible to trace functions from their start (as     
opposed to just tracing loops). We do that only for functions that can not be     
inlinined (either because they contain loops or they were marked as               
non-inlinable as described above).&lt;/p&gt;                                            
&lt;p&gt;The result of this is that the &lt;a class="reference external" href="http://svn.python.org/view/sandbox/trunk/decimal/telco/"&gt;Python version&lt;/a&gt; &lt;a class="reference external" href="http://speleotrove.com/decimal/telco.html"&gt;telco decimal benchmark&lt;/a&gt; runs                                 
to completion without having to arbitrarily increase the trace length limit.                    
It's also about 40% faster than running it on CPython. This is one of the first                 
non-tiny programs that we speed up.&lt;/p&gt;                                                         
&lt;/div&gt;                                                                                          
&lt;div class="section" id="reducing-gc-pressure"&gt;                                                 
&lt;h2&gt;Reducing GC Pressure&lt;/h2&gt;                                                                   
&lt;p&gt;Armin and Anto used some GC instrumentation to find places in pypy-c-jit                     
that allocate a lot of memory. This is an endlessly surprising exercise, as                     
usually we don't care too much about allocations of short-lived objects when                    
writing RPython, as our GCs usually deal well with those. They found a few                      
places where they could remove allocations, most importantly by making one of                   
the classes that make up traces smaller.&lt;/p&gt;                                                    
&lt;/div&gt;                                                                                          
&lt;div class="section" id="optimizing-chains-of-guards"&gt;                                          
&lt;h2&gt;Optimizing Chains of Guards&lt;/h2&gt;                                                            
&lt;p&gt;Carl Friedrich and Samuele started a simple optimization on the trace level that             
removes superfluous guards. A common pattern in a trace is to have stronger                     
and stronger guards about the same object. As an example, often there is first a                
guard that an object is not None, later followed by a guard that it is exactly                  
of a given class and then even later that it is a precise instance of that                      
class. This is inefficient, as we can just check the most precise thing in the                  
place of the first guard, saving us guards (which take memory, as they need resume data).       
Maciek, Armin and Anto later improved on that by introducing a new guard that                   
checks for non-nullity and a specific class in one guard, which allows us to                    
collapse more chains.&lt;/p&gt;                                                                       
&lt;/div&gt;                                                                                          
&lt;div class="section" id="improving-jit-and-exceptions"&gt;                                         
&lt;h2&gt;Improving JIT and Exceptions&lt;/h2&gt;                                                           
&lt;p&gt;Armin and Maciek went on a multi-day quest to make the JIT and Python-level                  
exceptions like each other more. So far, raising and catching exceptions would                  
make the JIT generate code that has a certain amusement value, but is not really                
fast in any way. To improve the situation, they had to dig into the exception                   
support in the Python interpreter, where they found various inefficiencies. They                
also had to rewrite the &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;exceptions&lt;/span&gt;&lt;/tt&gt; module to be in RPython (as opposed to                                                             
just pure Python + an old hack). Another problems is that tracebacks give you                   
access to interpreter frames. This forces the JIT to deoptimize things, as                      
the JIT keeps some of the frame's content in CPU registers or on the CPU stack,                 
which reflective access to frames prevents.                                                     
Currently we try to improve the simple cases where the traceback is never                       
actually accessed. This work is not completely finished, but some cases are                     
already significantly faster.&lt;/p&gt;                                                               
&lt;/div&gt;                                                                                          
&lt;div class="section" id="moving-pypy-to-use-py-test-1-1"&gt;                                       
&lt;h2&gt;Moving PyPy to use py.test 1.1&lt;/h2&gt;                                                         
&lt;p&gt;Holger worked on porting PyPy to use the &lt;a class="reference external" href="http://codespeak.net/py/dist/announce/release-1.1.0.html"&gt;newly released&lt;/a&gt; py.test 1.1. PyPy                   
still uses some very old support code in its testing infrastructure, which makes                
this task a bit annoying. He also gave the other PyPy developers a demo of some                 
of the newer py.test features and we discussed which of them we want to start                   
using to improve our tests to make them shorter and clearer. One of the things                  
we want to do eventually is to have less skipped tests than now.&lt;/p&gt;                            
&lt;/div&gt;                                                                                          
&lt;div class="section" id="using-a-simple-effect-analysis-for-the-jit"&gt;                           
&lt;h2&gt;Using a Simple Effect Analysis for the JIT&lt;/h2&gt;                                             
&lt;p&gt;One of the optimization the JIT does is caching fields that are read out of                  
structures on the heap. This cache needs to be invalidated at some points, for
example when such a field is written to (as we don't track aliasing much).
Another case is a call in the assembler, as the target function could
arbitrarily change the heap. This of course is imprecise, since most functions
don't actually change the whole heap, and we have an analysis that finds out
which sorts of types of structs and arrays a function can mutate. During the
sprint Carl Friedrich and Samuele integrated this analysis with the JIT, to help
it invalidate caches less aggressively. Later Anto and Carl Friedrich also
ported this support to the CLI version of the JIT.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="miscellaneous"&gt;
&lt;h2&gt;Miscellaneous&lt;/h2&gt;
&lt;p&gt;Samuele (with some assistance of Carl Friedrich) set up a buildbot slave on a
Mac Mini at the University. This should let us stabilize on the Max OS X. So far
we still have a number of &lt;a class="reference external" href="http://codespeak.net:8099/summary?category=mac"&gt;failing tests&lt;/a&gt;, but now we are in a situation to
sanely approach fixing them.&lt;/p&gt;
&lt;p&gt;Anto improved the CLI backend to support the infrastructure for producing the
&lt;a class="reference external" href="http://morepypy.blogspot.com/2009/11/hi-all-this-week-i-worked-on-improving.html"&gt;profiling graphs Armin introduced&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The guinea-pigs that were put into Carl Friedrich's care have been fed (which
was the most important sprint task anyway).&lt;/p&gt;
&lt;p&gt; Samuele &amp;amp; Carl Friedrich&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-2505348213879053352?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/6mtr-3MNLSo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/2505348213879053352/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=2505348213879053352" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/2505348213879053352?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/2505348213879053352?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/6mtr-3MNLSo/dusseldorf-sprint-report.html" title="Düsseldorf Sprint Report" /><author><name>Carl Friedrich Bolz</name><uri>http://www.blogger.com/profile/00518922641059511014</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13192987955131835812" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/11/dusseldorf-sprint-report.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0IASXg4fSp7ImA9WxNUFEQ.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-7608527610228870250</id><published>2009-11-06T10:23:00.000+01:00</published><updated>2009-11-06T10:25:48.635+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-06T10:25:48.635+01:00</app:edited><title>Düsseldorf Sprint Started</title><content type="html">The Düsseldorf sprint starts today. Only Samuele and me are there so far, but that should change over the course of the day. We will mostly work on the JIT during this sprint, trying to make it a lot more practical. For that we need to decrease its memory requirements some more and to make it use less aggressive inlining. We will post more as the sprint progresses.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-7608527610228870250?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/LNqtYWN8_ng" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/7608527610228870250/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=7608527610228870250" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/7608527610228870250?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/7608527610228870250?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/LNqtYWN8_ng/dusseldorf-sprint-started.html" title="Düsseldorf Sprint Started" /><author><name>Carl Friedrich Bolz</name><uri>http://www.blogger.com/profile/00518922641059511014</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13192987955131835812" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/11/dusseldorf-sprint-started.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UEQn8-eyp7ImA9WxNUFUU.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-5675275348619189353</id><published>2009-11-03T17:38:00.001+01:00</published><updated>2009-11-07T11:20:03.153+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-07T11:20:03.153+01:00</app:edited><title>PyPy on RuPy 2009</title><content type="html">Hello.
&lt;p&gt;
It's maybe a bit late to announce, but there will be PyPy talk
at &lt;a href="http://rupy.eu"&gt;Rupy&lt;/a&gt; conference this weekend in
Poznan. Precisely, I'll be talking mostly about PyPy's JIT and
how to use it. Unfortunately the talk is on Saturday, at 8:30 in the morning.
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;EDIT:&lt;/b&gt; Talk is &lt;a href="http://codespeak.net/svn/pypy/extradoc/talk/rupy2009"&gt;online&lt;/a&gt;, together with examples
&lt;/p&gt;
Cheers,&lt;br/&gt;
fijal&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-5675275348619189353?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/Il9x4CnyV2c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/5675275348619189353/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=5675275348619189353" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/5675275348619189353?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/5675275348619189353?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/Il9x4CnyV2c/pypy-on-rupy-2009.html" title="PyPy on RuPy 2009" /><author><name>Maciej Fijalkowski</name><uri>http://www.blogger.com/profile/11410841070239382771</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15356769323900246609" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/11/pypy-on-rupy-2009.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUIMSXs9eip7ImA9WxNUEUo.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-6515977421244851229</id><published>2009-11-01T19:59:00.000+01:00</published><updated>2009-11-02T16:59:48.562+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-02T16:59:48.562+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jit" /><title>Logging and nice graphs</title><content type="html">&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;This week I worked on improving the system we use for logging.  Well, it was not really a "system" but rather a pile of hacks to measure in custom ways timings and counts and display them.  So now, we have a system :-)&lt;/p&gt;

&lt;p&gt;The system in question was integrated in the code for the GC and the JIT, which are two independent components as far as the source is concerned.  However, we can now display a unified view.  Here is for example pypy-c-jit running pystone for (only) 5000 iterations:&lt;/p&gt;

&lt;a href="http://codespeak.net/~arigo/raw/pystone.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 51px;" src="http://3.bp.blogspot.com/_Sg3NUJ-JhgU/Su3bB2UIuMI/AAAAAAAAAAM/2-Vf5zry_4Q/s320/pystone.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5399212353093417154" /&gt;&lt;/a&gt;

&lt;p&gt;The top long bar represents time.  The bottom shows two summaries of the total time taken by the various components, and also plays the role of a legend to understand the colors at the top.  Shades of red are the GC, shades of green are the JIT.&lt;/p&gt;

&lt;p&gt;Here is another picture, this time on pypy-c-jit running 10 iterations of richards:&lt;/p&gt;

&lt;a href="http://codespeak.net/~arigo/raw/richards.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 19px;" src="http://4.bp.blogspot.com/_Sg3NUJ-JhgU/Su3bLDXoV5I/AAAAAAAAAAU/VPxEP_hqrFk/s320/richards.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5399212511216555922" /&gt;&lt;/a&gt;

&lt;p&gt;We have to look more closely at various examples, but a few things immediately show up.  One thing is that the GC is put under large pressure by the jit-tracing, jit-optimize and (to a lesser extent) the jit-backend components.  So large in fact that the GC takes at least 60-70% of the time there.  We will have to do something about it at some point.  The other thing is that on richards (and it's likely generally the case), the jit-blackhole component takes a lot of time.  "Blackholing" is the operation of recovering from a guard failure in the generated assembler, and falling back to the interpreter.  So this is also something we will need to improve.&lt;/p&gt;

&lt;p&gt;That's it!  The images were generated with the following commands:&lt;/p&gt;

&lt;pre&gt;PYPYLOG=/tmp/log pypy-c-jit richards.py
python pypy/tool/logparser.py draw-time /tmp/log --mainwidth=8000 --output=filename.png&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-6515977421244851229?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/YPgPJQRtfvY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/6515977421244851229/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=6515977421244851229" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/6515977421244851229?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/6515977421244851229?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/YPgPJQRtfvY/hi-all-this-week-i-worked-on-improving.html" title="Logging and nice graphs" /><author><name>Armin Rigo</name><uri>http://www.blogger.com/profile/06300515270104686574</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="12163836270373797954" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_Sg3NUJ-JhgU/Su3bB2UIuMI/AAAAAAAAAAM/2-Vf5zry_4Q/s72-c/pystone.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/11/hi-all-this-week-i-worked-on-improving.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUFRng5fyp7ImA9WxNWF0w.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-6174120095428192954</id><published>2009-10-16T16:27:00.000+02:00</published><updated>2009-10-16T18:23:37.627+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-16T18:23:37.627+02:00</app:edited><title>GC improvements</title><content type="html">&lt;p&gt;In the last week, I (Armin) have been taking some time off the
JIT work to improve our GCs.  More precisely, our GCs now take
one or two words less for every object.  This further reduce the
memory usage of PyPy, as we will show at the end.&lt;/p&gt;

&lt;h2&gt;Background information: RPython object model&lt;/h2&gt;

&lt;p&gt;We first need to understand the RPython object model as
implemented by our GCs and our C backend.  (Note that the
object model of the Python interpreter is built on top of
that, but is more complicated -- e.g. Python-level objects
are much more flexible than RPython objects.)&lt;/p&gt;

&lt;p&gt;Consider these two RPython classes:&lt;/p&gt;
    
&lt;pre&gt;
class A:
    def __init__(self, x):
        self.x = x
    def f(self):
        return self.x * 42

class B(A):
    def __init__(self, x, y):
        self.x = x
        self.y = y
    def f(self):
        return self.x + self.y
&lt;/pre&gt;

&lt;p&gt;The instances of A and B look like this in memory (all cells
are one word):&lt;/p&gt;

&lt;p&gt;&lt;table border=1&gt;&lt;tr&gt;
&lt;td&gt;GC header&lt;/td&gt;
&lt;td&gt;vtable ptr of A&lt;/td&gt;
&lt;td&gt;hash&lt;/td&gt;
&lt;td&gt;x&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;

&lt;p&gt;&lt;table border=1&gt;&lt;tr&gt;
&lt;td&gt;GC header&lt;/td&gt;
&lt;td&gt;vtable ptr of B&lt;/td&gt;
&lt;td&gt;hash&lt;/td&gt;
&lt;td&gt;x&lt;/td&gt;
&lt;td&gt;y&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;

&lt;p&gt;The first word, the GC header, describes the layout.  It
encodes on half a word the shape of the object, including where it
contains further pointers, so that the GC can trace it.  The
other half contains GC flags (e.g. the mark bit of a
mark-and-sweep GC).&lt;/p&gt;

&lt;p&gt;The second word is used for method dispatch.  It is similar to a
C++ vtable pointer.  It points to static data that is mostly a
table of methods (as function pointers), containing e.g. the method f
of the example.&lt;/p&gt;

&lt;p&gt;The hash field is not necessarily there; it is only present in classes
whose hash is ever taken in the RPython program (which includes being
keys in a dictionary).  It is an "identity hash": it works like
object.__hash__() in Python, but it cannot just be the address of
the object in case of a GC that moves objects around.&lt;/p&gt;

&lt;p&gt;Finally, the x and y fields are, obviously, used to store the value
of the fields.  Note that instances of B can be used in places that
expect a pointer to an instance of A.&lt;/p&gt;

&lt;h2&gt;Unifying the vtable ptr with the GC header&lt;/h2&gt;

&lt;p&gt;The first idea of saving a word in every object is the observation
that both the vtable ptr and the GC header store information about
the class of the object.  Therefore it is natural to try to only have
one of them.  The problem is that we still need bits for the GC flags,
so the field that we have to remove is the vtable pointer.&lt;/p&gt;

&lt;p&gt;This means that method dispatch needs to be more clever: it
cannot directly read the vtable ptr, but needs to compute it
from the half-word of the GC header.  Fortunately, this can be
done with no extra instruction on the assembler level.  Here is
how things will look like in the end, assuming a 32-bit x86
machine (but note that as usual we just generate portable C).&lt;/p&gt;

&lt;p&gt;The trick for achieving efficiency is that we store all
vtables together in memory, and make sure that they don't take
more than 256 KB in total (16 bits, plus 2 bits of alignment).
Here is how the assembler code (produced by the normal C
compiler, e.g. gcc) for calling a method looks like.  Before
the change:&lt;/p&gt;

&lt;pre&gt;
MOV EDX, [EAX + 4]               # load the vtable ptr from object EAX
MOV EDX, [EDX + method_offset]   # load the function pointer from the vtable
CALL EDX
&lt;/pre&gt;

&lt;p&gt;Instead, we now have:&lt;/p&gt;

&lt;pre&gt;
MOVZX EDX, [EAX]     # load the 16-bit part of the GC header from EAX
MOV EDX, [vtable_start + 4*EDX + method_offset]
CALL EDX
&lt;/pre&gt;

&lt;p&gt;Note that the complex addressing scheme done by the second MOV
is still just one instruction: the vtable_start and
method_offset are constants, so they are combined.  And as the
vtables are anyway aligned at a word boundary, we can use
4*EDX to address them, giving us 256 KB instead of just 64 KB
of vtables.&lt;/p&gt;

&lt;h2&gt;Optimizing the hash field&lt;/h2&gt;

&lt;p&gt;In PyPy's Python interpreter, all application-level objects
are represented as an instance of some subclass of W_Root.
Since all of these objects could potentially be stored in a
dictionary by the application Python program, all these
objects need a hash field.  Of course, in practice, only a
fraction of all objects in a Python program end up having
their hash ever taken.  Thus this field of W_Root is wasted
memory most of the time.&lt;/p&gt;

&lt;p&gt;(Up to now, we had a hack in place to save the hash field
on a few classes like W_IntegerObject, but that meant that
the Python expression ``object.__hash__(42)'' would raise
a TypeError in PyPy.)&lt;/p&gt;

&lt;p&gt;The solution we implemented now (done by some Java GCs, among
others) is to add a hash field to an object when the
(identity) hash of that object is actually taken.  This means
that we had to enhance our GCs to support this.  When objects
are allocated, we don't reserve any space for the hash:&lt;/p&gt;

object at 0x74B028
&lt;table border=1&gt;&lt;tr&gt;
&lt;td&gt;...00...&lt;/td&gt;
&lt;td&gt;x&lt;/td&gt;
&lt;td&gt;y&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;
    
&lt;p&gt;When the hash of an object is taken, we use its current memory
address, and set a flag in the GC header saying that this
particular object needs a hash:&lt;/p&gt;

object at 0x74B028
&lt;table border=1&gt;&lt;tr&gt;
&lt;td&gt;...01...&lt;/td&gt;
&lt;td&gt;x&lt;/td&gt;
&lt;td&gt;y&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;If the GC needs to move the object to another memory location,
it will make the new version of the object bigger, i.e. it
will also allocate space for the hash field:&lt;/p&gt;

object at 0x825F60
&lt;table border=1&gt;&lt;tr&gt;
&lt;td&gt;...11...&lt;/td&gt;
&lt;td&gt;x&lt;/td&gt;
&lt;td&gt;y&lt;/td&gt;
&lt;td&gt;0x74B028&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;This hash field is immediately initialized with the old memory
address, which is the hash value that we gave so far for the
object.  To not disturb the layout of the object, we always
put the extra hash field at the end.  Of course, once set,
the hash value does not change even if the object needs to
move again.&lt;/p&gt;

&lt;h2&gt;Results&lt;/h2&gt;

&lt;p&gt;Running the following program on PyPy's Python interpreter
with n=4000000:&lt;/p&gt;

&lt;pre&gt;
def make_linked_list(n):
    a = None
    i = 0
    while i &lt; n:
        b = X()
        b.next = a
        a = b
        i += 1
&lt;/pre&gt;

&lt;p&gt;the two optimizations together save 32 MB of RAM (i.e. 8 bytes
per object).  The version of PyPy we measured this with was built
as follows:&lt;/p&gt;

&lt;pre&gt;
./translate.py --gcremovetypeptr targetpypystandalone --objspace-std-withsharingdict
&lt;/pre&gt;

&lt;p&gt;The total amount of RAM used on a 32-bit Linux is 247 MB,
completing in 10.3 seconds.  On CPython, it consumes 684 MB
and takes 89 seconds to complete...  This nicely shows that
our GCs are much faster at allocating objects, and that our
objects can be much smaller than CPython's.&lt;/p&gt;

&lt;p&gt;Armin Rigo &amp; Carl Friedrich Bolz&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-6174120095428192954?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/BlNQfccceHk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/6174120095428192954/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=6174120095428192954" title="25 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/6174120095428192954?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/6174120095428192954?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/BlNQfccceHk/gc-improvements.html" title="GC improvements" /><author><name>Armin Rigo</name><uri>http://www.blogger.com/profile/06300515270104686574</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="12163836270373797954" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">25</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/10/gc-improvements.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQCQns5fyp7ImA9WxNWFkw.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-6698484455072589492</id><published>2009-10-15T15:36:00.000+02:00</published><updated>2009-10-15T15:46:03.527+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-15T15:46:03.527+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="cli" /><category scheme="http://www.blogger.com/atom/ns#" term="pypy" /><category scheme="http://www.blogger.com/atom/ns#" term="jit" /><title>First pypy-cli-jit benchmarks</title><content type="html">&lt;p&gt;As the readers of this blog &lt;a class="reference external" href="http://morepypy.blogspot.com/2008/11/porting-jit-to-cli-part-1.html"&gt;already know&lt;/a&gt;, I've been working on porting the
JIT to CLI/.NET for the last months.  Now that it's finally possible to get a
working pypy-cli-jit, it's time to do some benchmarks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Warning:&lt;/strong&gt; as usual, all of this has to be considered to be a alpha version:
don't be surprised if you get a crash when trying to run pypy-cli-jit.  Of
course, things are improving very quickly so it should become more and more
stable as days pass.&lt;/p&gt;
&lt;p&gt;For this time, I decided to run four benchmarks. Note that for all of them we
run the main function once in advance, to let the JIT recoginizing the hot
loops and emitting the corresponding code.  Thus, the results reported do
&lt;strong&gt;not&lt;/strong&gt; include the time spent by the JIT compiler itself, but give a good
measure of how good is the code generated by the JIT.  At this point in time,
I know that the CLI JIT backend spends way too much time compiling stuff, but
this issue will be fixed soon.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="http://paste.pocoo.org/show/145050/"&gt;f1.py&lt;/a&gt;: this is the classic PyPy JIT benchmark. It is just a function
that does some computational intensive work with integers.&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://paste.pocoo.org/show/143243/"&gt;floatdemo.py&lt;/a&gt;: this is the same benchmark involving floating point
numbers that have already been described in a previous &lt;a class="reference external" href="http://morepypy.blogspot.com/2009/10/pypys-jit-now-supports-floats.html"&gt;blog post&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://paste.pocoo.org/show/145051/"&gt;oodemo.py&lt;/a&gt;: this is just a microbenchmark doing object oriented stuff
such as method calls and attribute access.&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://paste.pocoo.org/show/145052/"&gt;richards2.py&lt;/a&gt;: a modified version of the classic richards.py, with a
warmup call before starting the real benchmark.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;The benchmarks were run on a Windows machine with an Intel Pentium Dual Core
E5200 2.5GHz and 2GB RAM, both with .NET (CLR 2.0) and Mono 2.4.2.3.&lt;/p&gt;
&lt;p&gt;Because of a known &lt;a class="reference external" href="https://bugzilla.novell.com/show_bug.cgi?id=474718"&gt;mono bug&lt;/a&gt;, if you use a version older than 2.1 you need
to pass the option &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;-O=-branch&lt;/span&gt;&lt;/tt&gt; to mono when running pypy-cli-jit, else it
will just loop forever.&lt;/p&gt;
&lt;p&gt;For comparison, we also run the same benchmarks with IronPython 2.0.1 and
IronPython 2.6rc1.  Note that IronPython 2.6rc1 does not work with mono.&lt;/p&gt;
&lt;p&gt;So, here are the results (expressed in seconds) with Microsoft CLR:&lt;/p&gt;
&lt;blockquote&gt;
&lt;table border="1" class="docutils"&gt;
&lt;colgroup&gt;
&lt;col width="15%" /&gt;
&lt;col width="20%" /&gt;
&lt;col width="15%" /&gt;
&lt;col width="12%" /&gt;
&lt;col width="20%" /&gt;
&lt;col width="18%" /&gt;
&lt;/colgroup&gt;
&lt;thead valign="bottom"&gt;
&lt;tr&gt;&lt;th class="head"&gt;Benchmark&lt;/th&gt;
&lt;th class="head"&gt;pypy-cli-jit&lt;/th&gt;
&lt;th class="head"&gt;ipy 2.0.1&lt;/th&gt;
&lt;th class="head"&gt;ipy 2.6&lt;/th&gt;
&lt;th class="head"&gt;ipy2.01/ pypy&lt;/th&gt;
&lt;th class="head"&gt;ipy2.6/ pypy&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td&gt;f1&lt;/td&gt;
&lt;td&gt;0.028&lt;/td&gt;
&lt;td&gt;0.145&lt;/td&gt;
&lt;td&gt;0.136&lt;/td&gt;
&lt;td&gt;5.18x&lt;/td&gt;
&lt;td&gt;4.85x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;floatdemo&lt;/td&gt;
&lt;td&gt;0.671&lt;/td&gt;
&lt;td&gt;0.765&lt;/td&gt;
&lt;td&gt;0.812&lt;/td&gt;
&lt;td&gt;1.14x&lt;/td&gt;
&lt;td&gt;1.21x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;oodemo&lt;/td&gt;
&lt;td&gt;1.25&lt;/td&gt;
&lt;td&gt;4.278&lt;/td&gt;
&lt;td&gt;3.816&lt;/td&gt;
&lt;td&gt;3.42x&lt;/td&gt;
&lt;td&gt;3.05x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;richards2&lt;/td&gt;
&lt;td&gt;1228&lt;/td&gt;
&lt;td&gt;442&lt;/td&gt;
&lt;td&gt;670&lt;/td&gt;
&lt;td&gt;0.36x&lt;/td&gt;
&lt;td&gt;0.54x&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/blockquote&gt;
&lt;p&gt;And with Mono:&lt;/p&gt;
&lt;blockquote&gt;
&lt;table border="1" class="docutils"&gt;
&lt;colgroup&gt;
&lt;col width="21%" /&gt;
&lt;col width="29%" /&gt;
&lt;col width="21%" /&gt;
&lt;col width="29%" /&gt;
&lt;/colgroup&gt;
&lt;thead valign="bottom"&gt;
&lt;tr&gt;&lt;th class="head"&gt;Benchmark&lt;/th&gt;
&lt;th class="head"&gt;pypy-cli-jit&lt;/th&gt;
&lt;th class="head"&gt;ipy 2.0.1&lt;/th&gt;
&lt;th class="head"&gt;ipy2.01/ pypy&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td&gt;f1&lt;/td&gt;
&lt;td&gt;0.042&lt;/td&gt;
&lt;td&gt;0.695&lt;/td&gt;
&lt;td&gt;16.54x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;floatdemo&lt;/td&gt;
&lt;td&gt;0.781&lt;/td&gt;
&lt;td&gt;1.218&lt;/td&gt;
&lt;td&gt;1.55x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;oodemo&lt;/td&gt;
&lt;td&gt;1.703&lt;/td&gt;
&lt;td&gt;9.501&lt;/td&gt;
&lt;td&gt;5.31x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;richards2&lt;/td&gt;
&lt;td&gt;720&lt;/td&gt;
&lt;td&gt;862&lt;/td&gt;
&lt;td&gt;1.20x&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/blockquote&gt;
&lt;p&gt;These results are very interesting: under the CLR, we are between 5x faster
and 3x slower than IronPython 2.0.1, and between 4.8x faster and 1.8x slower
than IronPython 2.6.  On the other hand, on mono we are consistently faster
than IronPython, up to 16x.  Also, it is also interesting to note that
pypy-cli runs faster on CLR than mono for all benchmarks except richards2.&lt;/p&gt;
&lt;p&gt;I've not investigated yet, but I think that the culprit is the terrible
behaviour of tail calls on CLR: as I already wrote in &lt;a class="reference external" href="http://morepypy.blogspot.com/2008/12/porting-jit-to-cli-part-3.html"&gt;another blog post&lt;/a&gt;,
tail calls are ~10x slower than normal calls on CLR, while being only ~2x
slower than normal calls on mono.  richads2 is probably the benchmark that
makes most use of tail calls, thus explaining why we have a much better result
on mono than CLR.&lt;/p&gt;
&lt;p&gt;The next step is probably to find an alternative implementation that does not
use tail calls: this probably will also improve the time spent by the JIT
compiler itself, which is not reported in the numbers above but that so far it
is surely too high to be acceptable. Stay tuned.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-6698484455072589492?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/NWtv6B3tHRk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/6698484455072589492/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=6698484455072589492" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/6698484455072589492?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/6698484455072589492?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/NWtv6B3tHRk/first-pypy-cli-jit-benchmarks.html" title="First pypy-cli-jit benchmarks" /><author><name>Antonio Cuni</name><uri>http://www.blogger.com/profile/17017456817083804792</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="05476111134258670758" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">7</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/10/first-pypy-cli-jit-benchmarks.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMBQnY-eip7ImA9WxNWEU0.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-7003493323596806737</id><published>2009-10-06T16:47:00.000+02:00</published><updated>2009-10-09T17:34:13.852+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-09T17:34:13.852+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jit" /><title>PyPy's JIT now supports floats</title><content type="html">&lt;p&gt;
Hello.
&lt;/p&gt;

&lt;p&gt;
We've just merged branch which adds float support to x86 backend.
This means that floating point operations are now super fast
in PyPy's JIT. Let's have a look at example, provided by 
&lt;a href="http://lazypython.blogspot.com/"&gt;Alex Gaynor&lt;/a&gt;
and stolen from &lt;a href="http://factor-language.blogspot.com/2009/08/performance-comparison-between-factor.html"&gt;Factor blog&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
The original version of the &lt;a href="http://paste.pocoo.org/raw/142952/"&gt;benchmark&lt;/a&gt;, was definitely tuned for the performance needs of CPython.
&lt;/p&gt;&lt;p&gt;
For running this on PyPy, I changed to a bit &lt;a href="http://paste.pocoo.org/show/143243/"&gt;simpler version of the program&lt;/a&gt;,
and I'll explain a few changes that I did, which the reflect current
limitations of PyPy's JIT. They're not very deep and they might be
already gone while you're reading it:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Usage of &lt;tt&gt;__slots__&lt;/tt&gt;. This is a bit ridiculous, but we spend quite a bit
  of time to speed up normal instances of new-style classes which are
  very fast, yet ones with &lt;tt&gt;__slots__&lt;/tt&gt; are slower. To be fixed soon.&lt;/li&gt;

&lt;li&gt;Usage of reduce. This one is even more obscure, but reduce is not
  perceived as a thing producing loops in a program. Moving to
  a pure-Python version of reduce fixes the problem.&lt;/li&gt;

&lt;li&gt;Using &lt;tt&gt;x ** 2&lt;/tt&gt; vs &lt;tt&gt;x * x&lt;/tt&gt;. In PyPy, reading a local variable is a
  no-op when JITted (the same as reading local variable in C). However
  multiplication is simpler operation that power operation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
I also included the original &lt;a href="http://paste.factorcode.org/paste?id=838"&gt;Java benchmark&lt;/a&gt;. Please
note that original java version is similar to my modified one
(not the one specifically tuned for CPython)
&lt;/p&gt;

The performance figures below (for &lt;tt&gt;n = 1 000 000&lt;/tt&gt;), average of 10 runs:

&lt;ul&gt;
&lt;li&gt;CPython 2.6: &lt;b&gt;7.56s&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;CPython &amp; psyco 2.6: &lt;b&gt;4.44s&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;PyPy: &lt;b&gt;1.63s&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Java (JVM 1.6, client mode): &lt;b&gt;0.77s&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
and while JVM is much faster, it's very good that we can even compare :-)
&lt;/p&gt;

Cheers&lt;br/&gt;
fijal&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-7003493323596806737?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/L_tCyuzBNaI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/7003493323596806737/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=7003493323596806737" title="23 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/7003493323596806737?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/7003493323596806737?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/L_tCyuzBNaI/pypys-jit-now-supports-floats.html" title="PyPy's JIT now supports floats" /><author><name>Maciej Fijalkowski</name><uri>http://www.blogger.com/profile/11410841070239382771</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15356769323900246609" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">23</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/10/pypys-jit-now-supports-floats.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkYASXcyeyp7ImA9WxNXEEU.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-6674537807334018925</id><published>2009-09-27T17:51:00.000+02:00</published><updated>2009-09-27T23:49:08.993+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-27T23:49:08.993+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jit" /><title>First results of the JIT</title><content type="html">&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;Just a quick note to tell you that we are progressing on the
JIT front.  Here are the running times of the &lt;a href="http://codespeak.net/svn/pypy/trunk/pypy/translator/goal/richards.py"&gt;richards&lt;/a&gt;
benchmark on my laptop:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;8.18 seconds with CPython 2.5.2;

&lt;li&gt;2.61 seconds with &lt;code&gt;pypy-c-jit&lt;/code&gt; (3x faster than CPython);

&lt;li&gt;1.04 seconds if you ignore the time spent making assembler (8x faster than CPython);

&lt;li&gt;1.59 seconds on Psyco, for reference (5x faster that CPython).&lt;/ul&gt;

&lt;p&gt;Yes, as this table shows, we are spending 1.57 seconds in the JIT
support code.  That's too much -- even ridiculously so -- for anything but a
long-running process.  We are working on that :-)&lt;/p&gt;

&lt;p&gt;If you want to build your own &lt;code&gt;pypy-c-jit&lt;/code&gt; (for x86-32 only for now):&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;you need a Subversion checkout of &lt;a href="http://codespeak.net/svn/pypy/trunk"&gt;trunk&lt;/a&gt;;

&lt;li&gt;run &lt;code&gt;pypy/translator/goal/translate.py&lt;/code&gt; with the &lt;code&gt;-Ojit&lt;/code&gt;
  option;

&lt;li&gt;as usual, wait a long time (and be sure you have more than 1GB of RAM).&lt;/ul&gt;

&lt;p&gt;For now &lt;code&gt;pypy-c-jit&lt;/code&gt; spews a lot of debugging output and
there are a few &lt;a href="http://codespeak.net:8099/summary?category=lib-python"&gt;known
examples&lt;/a&gt; where it crashes.  As we like to repeat, however, it's a complete JIT:
apart from the crashes (the bugs are probably in the JIT support code), it supports the whole Python language from the start -- in the sense of doing correct things.  Future work include
Python-specific improvements by e.g. tweaking the data structures used to store Python objects so that they are more JIT-friendly.&lt;/p&gt;

&lt;p&gt;EDIT: Oh yes, fijal reminds me that CPython 2.6 is 30% faster than CPython 2.5 on this benchmark (which is mostly my "fault", as I extracted a small part of PyPy and submitted it as a patch to CPython that works particularly well for examples like richards).  It does not fundamentally change the fact that we are way faster though.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-6674537807334018925?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/D9-sUoKltTE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/6674537807334018925/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=6674537807334018925" title="42 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/6674537807334018925?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/6674537807334018925?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/D9-sUoKltTE/first-results-of-jit.html" title="First results of the JIT" /><author><name>Armin Rigo</name><uri>http://www.blogger.com/profile/06300515270104686574</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="12163836270373797954" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">42</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/09/first-results-of-jit.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04HRH4zcSp7ImA9WxNQGE0.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-8153983964308175836</id><published>2009-09-24T18:30:00.000+02:00</published><updated>2009-09-24T18:32:15.089+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-24T18:32:15.089+02:00</app:edited><title>PyPy sprint in Düsseldorf, 6 Nov - 13 Nov</title><content type="html">&lt;p&gt;The next PyPy sprint will be held in the Computer Science department of
Heinrich-Heine Universität Düsseldorf from the 6th to the 13th of
November 2009. This is a fully public sprint, everyone is welcome to
join us.&lt;/p&gt;
&lt;div class="section" id="topics-and-goals"&gt;
&lt;h2&gt;Topics and goals&lt;/h2&gt;
&lt;p&gt;At the sprint we intend to work on the JIT generator in PyPy and on
applying it to PyPy Python interpreter.&lt;/p&gt;
&lt;p&gt;The precise work that will be done is not fixed, as we don't know in
which state the JIT will be in November.  However, possible areas of
work might include:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;tweaking the interpreter/objspace to be more JIT-friendly, e.g.
instance implementation code, call code&lt;/li&gt;
&lt;li&gt;if there is interest starting non x86-32 JIT backends&lt;/li&gt;
&lt;li&gt;trying out existing software to find features where the optimizations
of the JIT could be improved&lt;/li&gt;
&lt;li&gt;improving our benchmarking infrastructure&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We will give special priority to topics that &amp;quot;non-core&amp;quot; people find
interesting (as long as they are somehow JIT-related).&lt;/p&gt;
&lt;p&gt;For an introduction of how our JIT-generation process works, please
refer to our blog:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://morepypy.blogspot.com/2009/03/jit-bit-of-look-inside.html"&gt;http://morepypy.blogspot.com/2009/03/jit-bit-of-look-inside.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There is also a more dense academic paper about the subject:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://codespeak.net/svn/pypy/extradoc/talk/icooolps2009/bolz-tracing-jit-final.pdf"&gt;http://codespeak.net/svn/pypy/extradoc/talk/icooolps2009/bolz-tracing-jit-final.pdf&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="location"&gt;
&lt;h2&gt;Location&lt;/h2&gt;
&lt;p&gt;The sprint will take place in a seminar room of the computer science
department.  It is in the building 25.12 of the university campus. For
travel instructions see&lt;/p&gt;
&lt;blockquote&gt;
&lt;a class="reference external" href="http://stups.cs.uni-duesseldorf.de/anreise/esbahn.php"&gt;http://stups.cs.uni-duesseldorf.de/anreise/esbahn.php&lt;/a&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class="section" id="registration"&gt;
&lt;h2&gt;Registration&lt;/h2&gt;
&lt;p&gt;If you'd like to come, please subscribe to the &lt;a class="reference external" href="http://codespeak.net/mailman/listinfo/pypy-sprint"&gt;pypy-sprint mailing
list&lt;/a&gt; and drop a note about your interests and post any questions.
More organisational information will be send to that list.  We'll keep a
list of &lt;a class="reference external" href="http://codespeak.net/pypy/extradoc/sprintinfo/ddorf2009/people.txt"&gt;people&lt;/a&gt; which we'll update (which you can do so yourself if
you have codespeak commit rights).&lt;/p&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-8153983964308175836?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/wp5KobbaZyM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/8153983964308175836/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=8153983964308175836" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/8153983964308175836?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/8153983964308175836?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/wp5KobbaZyM/pypy-sprint-in-dusseldorf-6-nov-13-nov.html" title="PyPy sprint in Düsseldorf, 6 Nov - 13 Nov" /><author><name>Carl Friedrich Bolz</name><uri>http://www.blogger.com/profile/00518922641059511014</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13192987955131835812" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/09/pypy-sprint-in-dusseldorf-6-nov-13-nov.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0AMSXwyfSp7ImA9WxNSEk8.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-6401910947439531107</id><published>2009-08-25T17:05:00.000+02:00</published><updated>2009-08-25T20:43:08.295+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-25T20:43:08.295+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="parser" /><category scheme="http://www.blogger.com/atom/ns#" term="speed" /><category scheme="http://www.blogger.com/atom/ns#" term="compiler" /><title>PyPy gets a new compiler</title><content type="html">&lt;p&gt;Today, I merged the parser-compiler branch, which I have been working on over the summer. It contained a total rewrite of both PyPy's Python parser and AST compiler. PyPy's old parser was (in)famous internally for being complicated and slow (with many algorithmic complexities greater than O(n)). The new parser is a simple as &lt;a href="https://codespeak.net/viewvc/pypy/trunk/pypy/interpreter/pyparser/parser.py?view=markup"&gt;I could make it&lt;/a&gt; LL(1) parser like CPython (though it doesn't share the hacks of CPython's parser).&lt;/p&gt;

&lt;p&gt;The new compiler is based on the &lt;a href="http://doc.python.org/3.1/library/ast"&gt;Abstract Syntax Trees (AST) that CPython 2.5 introduced&lt;/a&gt; instead of PyPy's old AST based on the &lt;a href="http://doc.python.org/library/compiler"&gt;compiler package's&lt;/a&gt;. This means that Python code running on PyPy will be able to use the same _ast interface as CPython. PyPy's _ast implementation supports AST features that CPython 2.6 added, including &lt;a href="http://pythonic.pocoo.org/2008/3/29/ast-compilation-from-python"&gt;compiling modified AST to bytecode and executing it&lt;/a&gt;. In this rewrite, some more obscure compiler features were added, too. For example, jumps in bytecode can now be greater than 65535 bytes! (That's like an if statement with 7000 lines of code in the body.)&lt;/p&gt;

&lt;p&gt;While the PyPy translation toolchain still has many obscure details and hacks, this merge completes the process of making the actual Python interpreter very clean. Hopefully, this will make adding new features much easier and make PyPy less frustrating to maintain as well as providing application level code with an improved AST interface!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-6401910947439531107?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/tRjekmnhU50" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/6401910947439531107/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=6401910947439531107" title="12 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/6401910947439531107?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/6401910947439531107?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/tRjekmnhU50/pypy-gets-new-compiler_25.html" title="PyPy gets a new compiler" /><author><name>Benjamin</name><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15492294752690290524" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">12</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/08/pypy-gets-new-compiler_25.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQCQXY-cCp7ImA9WxNSEk8.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-3309138497953458138</id><published>2009-08-25T13:43:00.000+02:00</published><updated>2009-08-25T19:46:00.858+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-25T19:46:00.858+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jit" /><title>Gothenburg JIT sprint report</title><content type="html">&lt;p&gt;Finally, we managed to squeeze in some time to write a report about what
has been going on the mysterious JIT sprint in Gothenburg, Sweden.
The main goals of the sprint were to lay down the groundwork for getting
more JIT work going in the next months and get more of PyPy developers
up to speed with the current state of the JIT. One of the elements was
to get better stability of the JIT, moving it slowly from being a prototype to
actually work nicely on larger programs.&lt;/p&gt;

&lt;p&gt;The secret goal of the sprint was to seek more speed, which Anto and
Carl Friedrich did even during the break day:&lt;/p&gt;

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5R1EBmwBBTs/SpPO4UtSbsI/AAAAAAAAAMI/kgnIUZtrLec/s1600-h/Immag005.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_5R1EBmwBBTs/SpPO4UtSbsI/AAAAAAAAAMI/kgnIUZtrLec/s400/Immag005.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5373866247409790658" /&gt;&lt;/a&gt;
&lt;p&gt;We spent the first two days improving test coverage of the x86 backend
and the optimizer. Now we have 100% coverage with unittests
(modulo figleaf bugs), which does not mean anything, but it's better
than before.&lt;/p&gt;

&lt;p&gt;Then we spent quite some time improving the optimizer passes, so
now we generate far less code than before the sprint, because a lot of
it is optimized away. On the interpreter side, we marked more objects
(like code objects) as immutable, so that reading fields from them
can be constant-folded.&lt;/p&gt;
&lt;p&gt;Another important optimization that we did is to remove consecutive
reading of the same fields from the same structure, if no code in between
can change it.&lt;/p&gt;
&lt;p&gt;Our JIT is a hybrid environment, where only hot loops of code are jitted
and the rest stays being interpreted. We found out that the performance
of the non-jitted part was suboptimal, because all accesses to python
frames went through an extra layer of indirection. We removed this layer
of indirection, in the case where the jit and the interpreter cannot
access the same frame (which is the common case).&lt;/p&gt;
&lt;p&gt;We also spent some time improving the performance of our x86 backend,
by making it use more registers and by doing more advanced variable
renaming at the end of loops. It seems that using more registerd is not as
much of a win as we hoped, because modern day processors are much
smarter than we thought.&lt;/p&gt;
&lt;p&gt;The most mind bending part was finding why we loose performance by
making the JIT see more of the interpreter. It took us two very frustrating
days and 36 gray hairs to find out that from the JIT we call a different malloc
function in the Boehm GC, which is by far slower than the version that
we use from the interpreter. This meant that the more we jitted, the
slower our code got, purely because of the mallocs.&lt;/p&gt;
&lt;p&gt;Now that this is fixed, the world makes much more sense again.&lt;/p&gt;
&lt;p&gt;A lot of the sprint's work is not directly measurable in the performance
figures, but we did a lot of work that is necessary for performance to
improve in the next weeks. After we have done a bit more work, we should
be able to provide some performance figures for programs that are
more realistic than just loops that count to ten millions (which are
very fast already :).&lt;/p&gt;
&lt;p&gt;Now we're going to enjoy a couple of days off to recover from the sprint.&lt;/p&gt;
&lt;p&gt;Bästa hälsningar,&lt;br/&gt;
Carl Friedrich, fijal&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-3309138497953458138?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/wR_M5mZKT6I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/3309138497953458138/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=3309138497953458138" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/3309138497953458138?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/3309138497953458138?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/wR_M5mZKT6I/gothenburg-jit-sprint-report.html" title="Gothenburg JIT sprint report" /><author><name>Maciej Fijalkowski</name><uri>http://www.blogger.com/profile/11410841070239382771</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15356769323900246609" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_5R1EBmwBBTs/SpPO4UtSbsI/AAAAAAAAAMI/kgnIUZtrLec/s72-c/Immag005.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/08/gothenburg-jit-sprint-report.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAAQ30yeSp7ImA9WxJUGEg.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-2221073696038673235</id><published>2009-07-17T19:40:00.000+02:00</published><updated>2009-07-17T19:45:42.391+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-17T19:45:42.391+02:00</app:edited><title>PyPy numeric experiments</title><content type="html">&lt;p&gt;
Because PyPy will be presenting at the upcoming &lt;a href="http://www.euroscipy.org/"&gt;euroscipy&lt;/a&gt; conference, I have been playing recently with the idea of NumPy and PyPy integration. My idea is to integrate PyPy's JIT with NumPy or at least a very basic subset of it.  Time constraints make it impossible to hand write a JIT compiler that understands NumPy. But given PyPy's architecture we actually have a &lt;b&gt;JIT generator&lt;/b&gt;, so we don't need to write one :-)
&lt;/p&gt;

&lt;p&gt;
Our JIT has shown that it can speed up small arithmetic examples &lt;a href="http://morepypy.blogspot.com/2009/03/good-news-everyone.html"&gt;significantly&lt;/a&gt;. What happens with something like NumPy?
&lt;/p&gt;
&lt;p&gt;
I wrote a very minimal subset of NumPy in RPython, called micronumpy (only single-dimension int arrays that can only get and set items), and a &lt;a href="http://paste.pocoo.org/show/129187/"&gt;benchmark&lt;/a&gt; against it. The point of this benchmark is to compare the performance of a builtin function (numpy.minimum) against the equivalent hand-written function, written in pure Python and compiled by our JIT.
&lt;/p&gt;
&lt;p&gt;
The goal is to prove that it is possible to write algorithms in Python instead of C without loss of efficiency. Sure, we can write some functions (like minimum in the following example), but there is a whole universe of other ufuncs which would be cool to have in Python instead, assuming this could be done without a huge loss in efficiency.
&lt;/p&gt;
&lt;p&gt;
Here are the results. This is comparing PyPy svn revision 66303 in the pyjitpl5 branch against python 2.6 with NumPy 1.2.1. The builtin numpy.minimum in PyPy is just a naive implementation in RPython, which is comparable to the speed of a naive implementation written in C (and thus a bit slower than the optimized
version in NumPy):
&lt;/p&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td&gt;NumPy (builtin function)&lt;/td&gt;&lt;td&gt;0.12s&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;PyPy's micronumpy (builtin function)&lt;/td&gt;&lt;td&gt;0.28s&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;CPython (pure Python)&lt;/td&gt;&lt;td&gt;11s&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;PyPy with JIT (pure Python)&lt;/td&gt;&lt;td&gt;0.91s&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;
As we can see, PyPy's JIT is slower than the optmized NumPy's C version, but still much faster than CPython (12x).
&lt;/p&gt;
&lt;p&gt;
Why is it slower? When you actually look at assembler, it's pretty obvious that it's atrocious. There's a lot of speedup to be gained out of just doing simple optimizations on resulting assembler. There are also pretty obvious limitations, like x86 backend not being able to emit opcodes for floats or x86_64 not being there. Those limitations are not fundamental in any sense and can be relatively straightforward to overcome. Therefore it seems we can get C-level speeds for pure Python implementations of numeric algorithms using NumPy arrays in PyPy. I think it's an interesting perspective that Python has the potential of becoming less of a glue language and more of a real implementation language in the scientific field.
&lt;/p&gt;
Cheers,&lt;br/&gt;
fijal&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-2221073696038673235?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/ENV-wXIgmOE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/2221073696038673235/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=2221073696038673235" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/2221073696038673235?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/2221073696038673235?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/ENV-wXIgmOE/pypy-numeric-experiments.html" title="PyPy numeric experiments" /><author><name>Maciej Fijalkowski</name><uri>http://www.blogger.com/profile/11410841070239382771</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15356769323900246609" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">8</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/07/pypy-numeric-experiments.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YMQ3c4cCp7ImA9WxJUF0g.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-8415055006373020774</id><published>2009-07-16T16:38:00.000+02:00</published><updated>2009-07-16T16:39:42.938+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-16T16:39:42.938+02:00</app:edited><title>ECOOP 2009</title><content type="html">&lt;p&gt;Last week (from 6th to 10th of July) Anto, Armin and me (Carl Friedrich) were in
the magnificent city of Genova, Italy at the &lt;a class="reference external" href="http://ecoop09.disi.unige.it/"&gt;ECOOP&lt;/a&gt; conference. In this blog
post I want to give a (necessarily personal) account of what we did there.&lt;/p&gt;
&lt;div class="section" id="workshop-days-icooolps"&gt;
&lt;h2&gt;Workshop days: ICOOOLPS&lt;/h2&gt;
&lt;p&gt;The first two days of the conference were the &lt;a class="reference external" href="http://ecoop09.disi.unige.it/workshops.html"&gt;workshop days&lt;/a&gt;. On Monday we
attended the &lt;a class="reference external" href="http://icooolps.info/"&gt;ICOOOLPS workshop&lt;/a&gt;, (see &lt;a class="reference external" href="http://antigua.cs.man.ac.uk/icooolps/index.php/program.html"&gt;the programme of the workshop&lt;/a&gt;). We
had gotten two papers accepted at the workshop (one about &lt;a class="reference external" href="http://codespeak.net/svn/pypy/extradoc/talk/icooolps2009-dotnet/cli-jit.pdf"&gt;layering PyPy's JIT
on top of the CLR&lt;/a&gt; and one about the &lt;a class="reference external" href="http://codespeak.net/svn/pypy/extradoc/talk/icooolps2009/bolz-tracing-jit-final.pdf"&gt;basic idea of PyPy's tracing JIT&lt;/a&gt;) and
thus gave two presentations at the workshop, one was given &lt;a class="reference external" href="http://codespeak.net/svn/pypy/extradoc/talk/icooolps2009-dotnet/talk/talk.pdf"&gt;by Anto&lt;/a&gt;, the other
&lt;a class="reference external" href="http://codespeak.net/svn/pypy/extradoc/talk/icooolps2009/talk/talk.pdf"&gt;by me&lt;/a&gt;. Both went reasonably well, we got some positive feedback.&lt;/p&gt;
&lt;p&gt;Nearly all the other talks were rather interesting as well. I particularly liked
the one by &lt;a class="reference external" href="http://www.win.ua.ac.be/~hschipp/"&gt;Hans Schippers&lt;/a&gt;, who presented a machine model built on delegation
called &lt;a class="reference external" href="http://www.hpi-uni-potsdam.de/swa/projects/delmdsoc/"&gt;delMDSOC&lt;/a&gt;.  The model is meant implement most features that a language
would need that makes it possible to separate cross-cutting concerns. In the
talk at ICOOOLPS he presented an extension to the model that adds concurrency
support, using a combination of actors and coroutines. He then showed that the
concurrency mechanisms of Java, Salsa (and extension of Java adding actors) and
&lt;a class="reference external" href="http://iolanguage.com/"&gt;Io&lt;/a&gt; can be mapped to this model.&lt;/p&gt;
&lt;p&gt;Furthermore there were two interesting invited talks, one by &lt;a class="reference external" href="http://andreasgal.com"&gt;Andreas Gal&lt;/a&gt;
(Mozilla), and one by &lt;a class="reference external" href="http://blogs.azulsystems.com/cliff/"&gt;Cliff Click&lt;/a&gt; (&lt;a class="reference external" href="http://www.azulsystems.com/"&gt;Azul Systems&lt;/a&gt;). Andreas explained how
TraceMonkey works. This was very useful for me, because his talk was just before
mine and I could thus kill most of my introduction about tracing JIT compilers
and have more time for the really interesting stuff :-).  Cliff talked about
implementing other languages on top of the JVM and some of the pitfalls in
getting them perform well.&lt;/p&gt;
&lt;p&gt;All in all, ICOOOLPS was a very enjoyable workshop, also with many interesting
discussions.&lt;/p&gt;
&lt;p&gt;On Tuesday there were more workshops, but also the PyPy tutorial, so I only went
to a few talks of the &lt;a class="reference external" href="http://prog.vub.ac.be/cop09/"&gt;COP workshop&lt;/a&gt; and spent the rest of the morning
preparing the tutorial (see next section).&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="tutorial"&gt;
&lt;h2&gt;Tutorial&lt;/h2&gt;
&lt;p&gt;On Tuesday afternoon we gave a PyPy Tutorial, as part of the &lt;a class="reference external" href="http://ecoop09.disi.unige.it/summer-school.html"&gt;ECOOP summer
school&lt;/a&gt;. The first lesson we learned was that (as opposed to a community
conference) people don't necessarily want to actually take their laptop out and
try stuff. We gave a slow walk-through about the full life-cycle of development
of a dynamic language interpreter using PyPy's tool-chain: Starting from writing
your interpreter in RPython, testing it on top of CPython to translating it to
C, .NET or Java to actually adding hints to get a JIT inserted.&lt;/p&gt;
&lt;p&gt;There were about seven people attending the tutorial, a couple of which were
very interested and were asking questions and discussing. Some of the
discussions were even very technical, e.g. one about the details of our
type-inference algorithm for RPython and why we cannot do a bottom-up analysis
but have to use forward-propagation instead.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://www.cs.purdue.edu/homes/jv/"&gt;Jan Vitek&lt;/a&gt; of Purdue University told of some of the problems of the &lt;a class="reference external" href="http://www.cs.purdue.edu/homes/jv/soft/ovm/index.html"&gt;OVM
project&lt;/a&gt;, which is (among other things) a Java implementation in Java (OVM also
wants to support implementing VMs for other languages with it, if I understood
correctly). He said that the project has
essentially gotten too large and complicated, which means that it is very hard
for new people to get into the project. While PyPy doesn't have some of the
problems of a full Java implementation (e.g. right now our concurrency support
is minimal) I definitely think that some of these risks apply to PyPy as well
and we should find ways to improve the situation in this regard. Channeling
Samuele: Somewhere inside the large lumbering blob of PyPy there is an elegant
core trying to get out.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="main-conference"&gt;
&lt;h2&gt;Main Conference&lt;/h2&gt;
&lt;p&gt;From Wednesday till Friday the &lt;a class="reference external" href="http://ecoop09.disi.unige.it/accepted-papers.html"&gt;main conference&lt;/a&gt; was happening. Many of the
talks were not all that interesting for me, being quite Java centric. One talk
that I liked a lot was &amp;quot;Making Sense of Large Heaps&amp;quot;, which was presented by
&lt;a class="reference external" href="http://domino.research.ibm.com/comm/research_people.nsf/pages/nickmitchell.index.html"&gt;Nick Mitchell&lt;/a&gt; (IBM). He presented a tool called &amp;quot;Yeti&amp;quot; that can be used to
analyze large heaps of Java programs. The tool uses some clever algorithms and
heuristics to summarize the heap usage of data structures in intelligent ways to
make it easier to find possible memory-wasters in a program. Nick also gave Anto
and me a demo of the tool, where we tried to apply it to &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;pypy-jvm&lt;/span&gt;&lt;/tt&gt; (we found
out that a fifth of the static data in there belongs to the parser/compiler :-(
).&lt;/p&gt;
&lt;p&gt;On each of the days of the conference there was a keynote. I missed the one by
Simon Peyton-Jones on Wednesday about type classes in Haskell. On Thursday,
&lt;a class="reference external" href="http://en.wikipedia.org/wiki/David_Ungar"&gt;David Ungar&lt;/a&gt; was awarded the &lt;a class="reference external" href="http://www.aito.org/Dahl-Nygaard/"&gt;Dahl-Nygaard-Prize&lt;/a&gt; for his work on the &lt;a class="reference external" href="http://selflanguage.org/"&gt;Self
programming language&lt;/a&gt;. Subsequently he gave a really inspiring keynote with the
title &amp;quot;Self and Self: Whys and Wherefores&amp;quot; where he recollected Self's history,
both on a technical as well as on a social level. Parts of the talk were
snippets from the movies &lt;a class="reference external" href="http://www.smalltalk.org.br/movies/"&gt;Self: The Movie&lt;/a&gt; and &lt;a class="reference external" href="http://www.open-video.org/details.php?videoid=8050"&gt;Alternate Reality Kit&lt;/a&gt;, both
of which I highly recommend.&lt;/p&gt;
&lt;p&gt;The keynote on Friday was by &lt;a class="reference external" href="http://blogs.azulsystems.com/cliff/"&gt;Cliff Click&lt;/a&gt; with the title &amp;quot;Java on 1000 Cores:
Tales of Hardware/Software Co-design&amp;quot;. He described the custom CPU architecture
that &lt;a class="reference external" href="http://www.azulsystems.com/"&gt;Azul Systems&lt;/a&gt; has developed to run Java server applications on hundreds of
cores. The talk mostly talked about the hardware, which I found very interesting
(but some people didn't care for too much). Azul's CPU is essentially 54 in-order
RISC cores in a single processor. The cores have a lot of extensions that make
it easier to run Java on them, e.g. hardware read- and write-barriers,
hardware-transactional-memory and hardware escape-detection (!).&lt;/p&gt;
&lt;p&gt;In addition to the talks, there is of course always the hallway track (or coffee
track) which is the track where you stand in the hallway and discuss with
people. As usual, this was the most interesting part of the conference. One of
those talks was Anto and me giving a PyPy demo to David Ungar. We had a very
interesting discussion about VM implementation in general and the sort of
debugging tools you need to write in particular. He liked PyPy a lot, which
makes me very happy. He also liked the fact that I have actually read most Self
papers :-).&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-8415055006373020774?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/2Tq6cGxI2sI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/8415055006373020774/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=8415055006373020774" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/8415055006373020774?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/8415055006373020774?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/2Tq6cGxI2sI/ecoop-2009.html" title="ECOOP 2009" /><author><name>Carl Friedrich Bolz</name><uri>http://www.blogger.com/profile/00518922641059511014</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13192987955131835812" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">6</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/07/ecoop-2009.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cGQnozeyp7ImA9WxJWF0Q.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-8318355560715932819</id><published>2009-06-23T22:58:00.000+02:00</published><updated>2009-06-23T23:03:43.483+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-23T23:03:43.483+02:00</app:edited><title>EuroPython</title><content type="html">&lt;p&gt;&lt;a href="http://www.europython.eu/"&gt;EuroPython&lt;/a&gt; is coming.  We have &lt;a href="http://codespeak.net/svn/pypy/extradoc/talk/ep2009/abstract.txt"&gt;two 30-minutes talks&lt;/a&gt; that we will present.  In addition, the &lt;a href="http://codespeak.net/~pedronis/ep2009/announcement.txt"&gt;sprint&lt;/a&gt; takes place the 29th of June (there will be no-one from the team on the 28th of June), as well as on the 3rd and 4th of July.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-8318355560715932819?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/wFlqG-XHlUI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/8318355560715932819/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=8318355560715932819" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/8318355560715932819?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/8318355560715932819?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/wFlqG-XHlUI/europython.html" title="EuroPython" /><author><name>Armin Rigo</name><uri>http://www.blogger.com/profile/06300515270104686574</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="12163836270373797954" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/06/europython.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQNSX8yeyp7ImA9WxNSEk8.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-7289127796450840053</id><published>2009-06-23T21:56:00.000+02:00</published><updated>2009-08-25T19:46:38.193+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-25T19:46:38.193+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jit" /><title>JIT progress</title><content type="html">&lt;p&gt;In the last days I finally understood how to do virtualizables.  Now the frame overhead is gone. This was done with the help of discussion with Samuele, porting ideas from PyPy's first JIT attempt.
&lt;/p&gt;
&lt;p&gt;
This is of course work in progress, but it works in PyPy (modulo a few XXXs, but no bugs so far).  The performance of the resulting code is quite good: even with Boehm (the GC that is easy to compile to but gives a slowish pypy-c), a long-running loop typically runs 50% faster than CPython.  That's "baseline" speed, moreover: we will get better speed-ups by applying optimizations on the generated code.  Doing so is in progress, but it suddenly became easier because that optimization phase no longer has to consider virtualizables -- they are now handled earlier.
&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Update:&lt;/b&gt;Virtualizables is basically a way to avoid frame overhead. The frame object
is allocated and has a pointer, but the JIT is free to unpack it's fields (for example python
level locals) and store them somewhere else (stack or registers). Each external (out of jit) access
to frame managed by jit, needs to go via special accessors that can ask jit where those variables
are.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-7289127796450840053?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/exlpo9rTwZE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/7289127796450840053/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=7289127796450840053" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/7289127796450840053?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/7289127796450840053?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/exlpo9rTwZE/jit-progress.html" title="JIT progress" /><author><name>Armin Rigo</name><uri>http://www.blogger.com/profile/06300515270104686574</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="12163836270373797954" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">7</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/06/jit-progress.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMGQX8zfCp7ImA9WxNSEk8.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-367552118380842303</id><published>2009-06-16T00:59:00.000+02:00</published><updated>2009-08-25T19:47:00.184+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-25T19:47:00.184+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jit" /><title>News from the jit front</title><content type="html">&lt;p&gt;
As usual, progress is going &lt;a href="http://en.wikipedia.org/wiki/Hofstadter's_law"&gt;slower then predicted&lt;/a&gt;,
but nevertheless, we're working hard to make some progress.
&lt;/p&gt;
&lt;p&gt;
We recently managed to make our nice GCs cooperate with our JIT. This is
one point from our detailed plan. As of now, we have a JIT with GCs and
no optimizations. It already speeds up some things, while slowing down
others. The main reason for this is that the JIT generates assembler which is kind
of ok, but it does not do the same level of optimizations gcc would do.
&lt;/p&gt;
&lt;p&gt;
So the current status of the JIT is that it can produce assembler out
of executed python code (or any interpreter written in RPython actually),
but the results are not high quality enough since we're missing optimizations.
&lt;/p&gt;
&lt;p&gt;
The current plan, as of now, looks as follows:
&lt;ul&gt;
&lt;li&gt;
Improve the handling of GCs in JIT with inlining of malloc-fast
  paths, that should speed up things by a constant, not too big factor.
&lt;/li&gt;
&lt;li&gt;
Write a simplified python interpreter, which will be a base for experiments
  and to make sure that our JIT does correct things with regard to
  optimizations. That would work as mid-level integration test.
&lt;/li&gt;
&lt;li&gt;
Think about ways to inline loop-less python functions into their parent's loop.
&lt;/li&gt;
&lt;li&gt;
Get rid of frame overhead (by virtualizables)
&lt;/li&gt;
&lt;li&gt;
Measure, write benchmarks, publish
&lt;/li&gt;
&lt;li&gt;
Profit
&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
Cheers,&lt;br/&gt;
fijal&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-367552118380842303?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/z-t7aIHsi98" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/367552118380842303/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=367552118380842303" title="14 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/367552118380842303?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/367552118380842303?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/z-t7aIHsi98/news-from-jit-front.html" title="News from the jit front" /><author><name>Maciej Fijalkowski</name><uri>http://www.blogger.com/profile/11410841070239382771</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15356769323900246609" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">14</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/06/news-from-jit-front.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMCQXoyfyp7ImA9WxNSEk8.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-6705901656116873587</id><published>2009-05-16T11:24:00.000+02:00</published><updated>2009-08-25T19:47:40.497+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-25T19:47:40.497+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jit" /><title>ICOOOLPS Submissions</title><content type="html">&lt;p&gt;&lt;em&gt;Both&lt;/em&gt; of the papers that people from the PyPy team submitted to &lt;a class="reference external" href="http://www.icooolps.info/"&gt;ICOOOLPS&lt;/a&gt; have
been accepted. They are:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&amp;quot;Faster than C#: efficient implementation of dynamic languages on .NET&amp;quot;
(&lt;a class="reference external" href="http://codespeak.net/svn/pypy/extradoc/talk/icooolps2009-dotnet/cli-jit.pdf"&gt;pdf1&lt;/a&gt;) by Armin, Anto and Davide Ancona, who is Anto's Ph.D. advisor&lt;/li&gt;
&lt;li&gt;&amp;quot;Tracing the Meta-Level: PyPy’s Tracing JIT Compiler&amp;quot; (&lt;a class="reference external" href="http://codespeak.net/svn/pypy/extradoc/talk/icooolps2009/bolz-tracing-jit.pdf"&gt;pdf2&lt;/a&gt;) by Carl
Friedrich, Armin, Anto and Maciek&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;(the pdfs are obviously the submitted versions, not the final ones).&lt;/p&gt;
&lt;p&gt;This year ICOOOLPS (Implementation, Compilation, Optimization of
Object-Oriented Languages, Programs and Systems) is being held on July the 6th
at &lt;a class="reference external" href="http://ecoop09.disi.unige.it/"&gt;ECOOP 2009&lt;/a&gt; in Genova, Italy.  Other than these two papers, Anto and Carl
Friedrich will also present a &lt;a class="reference external" href="http://ecoop09.disi.unige.it/summer-school.html#pypy"&gt;PyPy tutorial&lt;/a&gt;, on July the 7th.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-6705901656116873587?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/f7elAm8-_Xc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/6705901656116873587/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=6705901656116873587" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/6705901656116873587?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/6705901656116873587?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/f7elAm8-_Xc/icooolps-submissions.html" title="ICOOOLPS Submissions" /><author><name>Carl Friedrich Bolz</name><uri>http://www.blogger.com/profile/00518922641059511014</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13192987955131835812" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/05/icooolps-submissions.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMDRXY4eCp7ImA9WxNSEk8.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-522864241041643529</id><published>2009-04-30T23:40:00.000+02:00</published><updated>2009-08-25T19:47:54.830+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-25T19:47:54.830+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jit" /><title>4 weeks of GDB</title><content type="html">&lt;p&gt;Hello.&lt;/p&gt;
&lt;p&gt;
So, according to our &lt;a href="http://morepypy.blogspot.com/2009/04/roadmap-for-jit.html"&gt;jit
plan&lt;/a&gt; we're mostly done with point 1, that is to provide a JIT that compiles
python code to assembler in the most horrible manner possible but doesn't
break. That meant mostly 4 weeks of glaring at GDB and megabytess of assembler
generated by C code generated from python code. The figure of 4 weeks proves
that our approach is by far superior to the one of psyco, since Armin says it's
"only 4 weeks" :-)
&lt;/p&gt;
&lt;p&gt;
Right now, pypy compiled with JIT can run the whole CPython test suite
without crashing, which means we're done with obvious bugs and the only
ones waiting for us are really horrible.  (Or they really don't exist.
At least they should never be about obscure Python corner cases: they can
only be in the 10'000 lines of relatively clear code that is our JIT
generator.)
&lt;/p&gt;
&lt;p&gt;
But... the fun thing is that we can actually concentrate on optimizations!
So the next step is to provide a JIT that is correct *and* actually speeds
up python. Stay tuned for more :-)
&lt;/p&gt;
Cheers,&lt;br/&gt;
fijal, armin &amp; benjamin
&lt;p&gt;
UPDATE: for those of you blessed with no knowledge of C, gdb stands for GNU debugger, a classic debugger for C. (It's also much more powerful than python debugger, pdb, which is kind of surprising).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-522864241041643529?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/cW8Zh6CMSWs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/522864241041643529/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=522864241041643529" title="15 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/522864241041643529?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/522864241041643529?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/cW8Zh6CMSWs/4-weeks-of-gdb.html" title="4 weeks of GDB" /><author><name>Maciej Fijalkowski</name><uri>http://www.blogger.com/profile/11410841070239382771</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15356769323900246609" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">15</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/04/4-weeks-of-gdb.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYAQXwzeCp7ImA9WxJTGU4.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-225813777919757859</id><published>2009-04-28T16:39:00.000+02:00</published><updated>2009-04-28T16:49:00.280+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-28T16:49:00.280+02:00</app:edited><title>1.1 final released</title><content type="html">&lt;p&gt;We &lt;a class="reference external" href="http://codespeak.net/pypy/dist/pypy/doc/release-1.1.0.html"&gt;just released&lt;/a&gt; PyPy 1.1 final. Not much changed since &lt;a class="reference external" href="http://morepypy.blogspot.com/2009/04/beta-for-110-released.html"&gt;the beta&lt;/a&gt;, apart
from some more fixed bugs. Have fun with it!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-225813777919757859?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/XzIZpdqFPkw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/225813777919757859/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=225813777919757859" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/225813777919757859?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/225813777919757859?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/XzIZpdqFPkw/11-final-released.html" title="1.1 final released" /><author><name>Carl Friedrich Bolz</name><uri>http://www.blogger.com/profile/00518922641059511014</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13192987955131835812" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/04/11-final-released.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QGQXs4eCp7ImA9WxJTE04.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-377358891902851723</id><published>2009-04-21T20:38:00.000+02:00</published><updated>2009-04-21T20:42:00.530+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-21T20:42:00.530+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="roadmap" /><category scheme="http://www.blogger.com/atom/ns#" term="speed" /><category scheme="http://www.blogger.com/atom/ns#" term="pypy" /><category scheme="http://www.blogger.com/atom/ns#" term="jit" /><title>Roadmap for JIT</title><content type="html">&lt;p&gt;Hello.
&lt;/p&gt;
&lt;p&gt;
First a disclaimer. This post is more about plans for future than current
status. We usually try to write about things that we have done, because
it's much much easier to promise things than to actually make it happen,
but I think it's important enough to have some sort of roadmap.
&lt;/p&gt;
&lt;p&gt;
In recent months we came to the point where the 5th generation of
JIT prototype was working as &lt;a href="http://morepypy.blogspot.com/2009/03/good-news-everyone.html"&gt;nice&lt;/a&gt;
or even a bit nicer than 1st one back in 2007. Someone might ask "so why
did you spend all this time without going forward?". And indeed, we spend
a lot of time moving sideways, but as posted, we also spent a lot of time
doing &lt;a href="http://morepypy.blogspot.com/2009/04/beta-for-110-released.html"&gt;some other things&lt;/a&gt;, which are important as well.
The main advantage of current JIT incarnation is much much simpler than
the first one. Even I can comprehend it, which is much of an improvement :-)
&lt;/p&gt;
&lt;p&gt;
So, the prototype is working and gives very nice speedups in range of 20-30x
over CPython. We're pretty confident this prototype will work and will
produce fast python interpreter eventually. So we decided that now we'll
work towards changing prototype into something stable and solid. This
might sound easy, but in fact it's not. Having stable assembler backend
and optimizations that keep semantics is not as easy as it might sound.
&lt;/p&gt;
&lt;p&gt;
The current roadmap, as I see it, looks like as following:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt; Provide a JIT that does not speedup things, but produce assembler without
  optimizations turned on, that is correct and able to run CPython's library
  tests on a nightly basis.
&lt;/li&gt;
&lt;li&gt;
 Introduce simple optimizations, that should make above JIT a bit faster than
  CPython. With optimizations disabled JIT is producing incredibly dumb
  assembler, which is slower than correspoding C code, even with removal
  of interpretation overhead (which is not very surprising).
&lt;/li&gt;
&lt;li&gt;
 Backport optimizations from JIT prototype, one by one, keeping an eye
  on how they perform and making sure they don't break anything.
&lt;/li&gt;
&lt;li&gt;
 Create new optimizations, like speeding up attribute access.
&lt;/li&gt;
&lt;li&gt;
 Profit.
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
This way, we can hopefully provide a working JIT, which gives fast python
interpreter, which is a bit harder than just a nice prototype.
&lt;/p&gt;
&lt;p&gt;
Tell us what you think about this plan.
&lt;/p&gt;
Cheers,&lt;br/&gt;
fijal &amp; others.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-377358891902851723?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/bB2KoqJM9I4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/377358891902851723/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=377358891902851723" title="18 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/377358891902851723?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/377358891902851723?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/bB2KoqJM9I4/roadmap-for-jit.html" title="Roadmap for JIT" /><author><name>Maciej Fijalkowski</name><uri>http://www.blogger.com/profile/11410841070239382771</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15356769323900246609" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">18</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/04/roadmap-for-jit.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EGRXk8eyp7ImA9WxJTE08.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-1416905818217912359</id><published>2009-04-21T16:47:00.000+02:00</published><updated>2009-04-21T16:53:44.773+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-21T16:53:44.773+02:00</app:edited><title>Leysin Sprint Report</title><content type="html">The Leysin sprint is nearing its end, as usual here is an attempt at a summary
&lt;p&gt;of what we did.&lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zICyAWqZbLA/Se3dHMjUvrI/AAAAAAAAAHk/ZwGu2owTSok/s1600-h/landscape.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 213px;" src="http://4.bp.blogspot.com/_zICyAWqZbLA/Se3dHMjUvrI/AAAAAAAAAHk/ZwGu2owTSok/s320/landscape.jpg" alt="Beautiful Leysin Landscape" id="BLOGGER_PHOTO_ID_5327157049947373234" border="0" /&gt;&lt;/a&gt;&lt;div class="section" id="release-work"&gt;
&lt;h2&gt;Release Work&lt;/h2&gt;
&lt;p&gt;Large parts of the sprint were dedicated to fixing bugs. Since the easy bugs
seem to have been fixed long ago, those were mostly very annoying and hard bugs.
This work was supported by our &lt;a class="reference external" href="http://codespeak.net:8099/"&gt;buildbots&lt;/a&gt;, which we tried to get free of
test-failures. This was worked on by nearly all participants of the sprint
(Samuele, Armin, Anto, Niko, Anders, Christian, Carl Friedrich). One
particularly annoying bug was the differences in the tracing events that PyPy
produces (fixed by Anders, Samuele and Christian). Some details about larger
tasks are in the sections below.&lt;/p&gt;
&lt;p&gt;The work culminated in the &lt;a class="reference external" href="http://morepypy.blogspot.com/2009/04/beta-for-110-released.html"&gt;beta&lt;/a&gt; released on Sunday.&lt;/p&gt;
&lt;div class="section" id="stackless"&gt;
&lt;h3&gt;Stackless&lt;/h3&gt;
&lt;p&gt;A large number of problems came from our &lt;a class="reference external" href="http://codespeak.net/pypy/dist/pypy/doc/stackless.html"&gt;stackless features&lt;/a&gt;, which do some
advanced things and thus seem to contain advanced bugs. Samuele and Carl
Friedrich spent some time fixing tasklet pickling and unpickling. This was
achieved by supporting the (un)pickling of builtin code objects. In addition
they fixed some bugs in the finalization of tasklets. This needs some care
because the &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;__del__&lt;/span&gt;&lt;/tt&gt; of a tasklet cannot run at arbitrary points in time, but
only at safe points. This problem was a bit subtle to get right, and popped up
nearly every morning of the sprint in form of a test failure.&lt;/p&gt;
&lt;p&gt;Armin and Niko added a way to restrict the stack depth of the RPython-level
stack. This can useful when using stackless, because if this is not there it is
possible that you fill your whole heap with stack frames in the case of an
infinite recursion. Then they went on to make stackless not segfault when
threads are used at the same time, or if a callback from C library code is in
progress. Instead you get a &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;RuntimeError&lt;/span&gt;&lt;/tt&gt; now, which is not good but better
than a segfault.&lt;/p&gt;
&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zICyAWqZbLA/Se3dbHpy8xI/AAAAAAAAAH0/7rgKpUQhFVA/s1600-h/pair2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 213px;" src="http://2.bp.blogspot.com/_zICyAWqZbLA/Se3dbHpy8xI/AAAAAAAAAH0/7rgKpUQhFVA/s320/pair2.jpg" alt="Anto and Armin working on the JIT" id="BLOGGER_PHOTO_ID_5327157392229724946" border="0" /&gt;&lt;/a&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zICyAWqZbLA/Se3dazWieiI/AAAAAAAAAHs/JeahZb31xyg/s1600-h/pair1.jpg"&gt;
&lt;/a&gt;&lt;div class="section" id="killing-features"&gt;
&lt;h3&gt;Killing Features&lt;/h3&gt;
&lt;p&gt;During the sprint we discussed the fate of the LLVM and the JS backends. Both
have not really been maintained for some time, and even partially untested
(their tests were skipped). Also their usefulness appears to be limited. The JS
backend is cool in principle, but has some serious limitations due to the fact
that JavaScript is really a dynamic language, while RPython is rather static.
This made it hard to use some features of JS from RPython, e.g. RPython does not
support closures of any kind.&lt;/p&gt;
&lt;p&gt;The LLVM backend had its own set of problems. For
a long time it produced the fastest form of PyPy's Python interpreter, by first
using the LLVM backend, applying the LLVM optimizations to the result, then
using LLVM's C backend to produce C code, then apply GCC to the result :-).
However, it is not clear that it is still useful to directly produce LLVM
bitcode, since LLVM has rather good C frontends nowadays, with &lt;a class="reference external" href="http://llvm.org/cmds/llvmgcc.html"&gt;llvm-gcc&lt;/a&gt; and
&lt;a class="reference external" href="http://clang.llvm.org/"&gt;clang&lt;/a&gt;. It is likely that we will use LLVM in the future in our JIT (but that's
another story, based on different code).&lt;/p&gt;
&lt;p&gt;Therefore we decided to remove these two backends from SVN, which Samuele and
Carl Friedrich did. They are not dead, only resting until somebody who is
interested in maintaining them steps up.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="windows"&gt;
&lt;h3&gt;Windows&lt;/h3&gt;
&lt;p&gt;One goal of the release is good Windows-support. Anders and Samuele set up a new
&lt;a class="reference external" href="http://codespeak.net:8099/builders/pypy-c-lib-python-win-32"&gt;windows buildbot&lt;/a&gt; which revealed a number of failures. Those were attacked by
Anders, Samuele and Christian as well as by Amaury (who was not at the sprint,
but thankfully did a lot of Windows work in the last months).&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="os-x"&gt;
&lt;h3&gt;OS X&lt;/h3&gt;
&lt;p&gt;Christian with some help by Samuele tried to get translation working again under
Mac OS X. This was a large mess, because of different behaviours of some POSIX
functionality in Leopard. It is still possible to get the old behaviour back,
but whether that was enabled or not depended on a number of factors such as
which Python is used. Eventually they managed to successfully navigate that maze
and produce something that almost works (there is still a problem remaining
about OpenSSL).&lt;/p&gt;
&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zICyAWqZbLA/Se3dazWieiI/AAAAAAAAAHs/JeahZb31xyg/s1600-h/pair1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 213px;" src="http://1.bp.blogspot.com/_zICyAWqZbLA/Se3dazWieiI/AAAAAAAAAHs/JeahZb31xyg/s320/pair1.jpg" alt="Samuele and Carl Friedrich pretending to work on something" id="BLOGGER_PHOTO_ID_5327157386780244514" border="0" /&gt;&lt;/a&gt;
&lt;div class="section" id="documentation"&gt;
&lt;h3&gt;Documentation&lt;/h3&gt;
&lt;p&gt;The Friday of the sprint was declared to be a documentation day, where (nearly)
no coding was allowed. This resulted in a newly structured and improved &lt;a class="reference external" href="http://codespeak.net/pypy/dist/pypy/doc/getting-started.html"&gt;getting
started&lt;/a&gt; document (done by Carl Friedrich, Samuele and some help of Niko) and
a new document describing &lt;a class="reference external" href="http://codespeak.net/pypy/dist/pypy/doc/cpython_differences.html"&gt;differences to CPython&lt;/a&gt; (Armin, Carl Friedrich) as
well as various improvements to existing documents (everybody else). Armin
undertook the Sisyphean task of &lt;a class="reference external" href="http://codespeak.net/pypy/dist/pypy/doc/extradoc.html"&gt;listing all talks, paper and related stuff&lt;/a&gt;
of the PyPy project.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="various-stuff"&gt;
&lt;h2&gt;Various Stuff&lt;/h2&gt;
&lt;div class="section" id="java-backend-work"&gt;
&lt;h3&gt;Java Backend Work&lt;/h3&gt;
&lt;p&gt;Niko and Anto worked on the JVM backend for a while. First they had to fix
translation of the Python interpreter to Java. Then they tried to improve the
performance of the Python interpreter when translated to Java. Mostly they did a
lot of profiling to find performance bottlenecks. They managed to improve
performance by 40% by overriding &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;fillInStackTrace&lt;/span&gt;&lt;/tt&gt; of the generated exception
classes. Apart from that they found no simple-to-fix performance problems.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="jit-work"&gt;
&lt;h3&gt;JIT Work&lt;/h3&gt;
&lt;p&gt;Armin gave a presentation about the current state of the JIT to the sprinters as
well as Adrian Kuhn, Toon Verwaest and Camillo Bruni of the University of Bern
who came to visit for one day. There was a bit of work on the JIT going on too;
Armin and Anto tried to get closer to having a working JIT on top of the CLI.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-1416905818217912359?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/1Q2X0MvuEfc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/1416905818217912359/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=1416905818217912359" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/1416905818217912359?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/1416905818217912359?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/1Q2X0MvuEfc/leysin-sprint-report.html" title="Leysin Sprint Report" /><author><name>Carl Friedrich Bolz</name><uri>http://www.blogger.com/profile/00518922641059511014</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13192987955131835812" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_zICyAWqZbLA/Se3dHMjUvrI/AAAAAAAAAHk/ZwGu2owTSok/s72-c/landscape.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/04/leysin-sprint-report.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MMSX08fip7ImA9WxJTEUo.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-4604559533184706699</id><published>2009-04-19T23:33:00.000+02:00</published><updated>2009-04-20T00:18:08.376+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-20T00:18:08.376+02:00</app:edited><title>Beta for 1.1.0 released</title><content type="html">&lt;p&gt;Today we are releasing a beta of the upcoming PyPy 1.1 release. There
are some Windows and OS X issues left that we would like to address
between now and the final release but apart from this things should be
working. We would appreciate feedback.&lt;/p&gt;
&lt;p&gt;The PyPy development team.&lt;/p&gt;
&lt;div class="section" id="pypy-1-1-compatibility-consolidation"&gt;
&lt;h2&gt;PyPy 1.1: Compatibility &amp;amp; Consolidation&lt;/h2&gt;
&lt;p&gt;Welcome to the PyPy 1.1 release - the first release after the end of EU
funding. This release focuses on making PyPy's Python interpreter more
compatible with CPython (currently CPython 2.5) and on making the
interpreter more stable and bug-free.&lt;/p&gt;
&lt;p&gt;PyPy's Getting Started lives at:&lt;/p&gt;
&lt;blockquote&gt;
&lt;a class="reference external" href="http://codespeak.net/pypy/dist/pypy/doc/getting-started.html"&gt;http://codespeak.net/pypy/dist/pypy/doc/getting-started.html&lt;/a&gt;&lt;/blockquote&gt;
&lt;div class="section" id="highlights-of-this-release"&gt;
&lt;h2&gt;Highlights of This Release&lt;/h2&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p class="first"&gt;More of CPython's standard library extension modules are supported,
among them ctypes, sqlite3, csv, and many more. Most of these extension modules
are fully supported under Windows as well.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://codespeak.net/pypy/dist/pypy/doc/cpython_differences.html"&gt;http://codespeak.net/pypy/dist/pypy/doc/cpython_differences.html&lt;/a&gt;
&lt;a class="reference external" href="http://morepypy.blogspot.com/2008/06/pypy-improvements.html"&gt;http://morepypy.blogspot.com/2008/06/pypy-improvements.html&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Through a large number of tweaks, performance has been improved by
10%-50% since the 1.0 release. The Python interpreter is now between
0.8-2x (and in some corner case 3-4x) slower than CPython. A large
part of these speed-ups come from our new generational garbage
collectors.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://codespeak.net/pypy/dist/pypy/doc/garbage_collection.html"&gt;http://codespeak.net/pypy/dist/pypy/doc/garbage_collection.html&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Our Python interpreter now supports distutils as well as
easy_install for pure-Python modules.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;We have tested PyPy with a number of third-party libraries. PyPy can
run now: Django, Pylons, BitTorrent, Twisted, SymPy, Pyglet, Nevow,
Pinax:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://morepypy.blogspot.com/2008/08/pypy-runs-unmodified-django-10-beta.html"&gt;http://morepypy.blogspot.com/2008/08/pypy-runs-unmodified-django-10-beta.html&lt;/a&gt;
&lt;a class="reference external" href="http://morepypy.blogspot.com/2008/07/pypys-python-runs-pinax-django.html"&gt;http://morepypy.blogspot.com/2008/07/pypys-python-runs-pinax-django.html&lt;/a&gt;
&lt;a class="reference external" href="http://morepypy.blogspot.com/2008/06/running-nevow-on-top-of-pypy.html"&gt;http://morepypy.blogspot.com/2008/06/running-nevow-on-top-of-pypy.html&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;A buildbot was set up to run the various tests that PyPy is using
nightly on Windows and Linux machines:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://codespeak.net:8099/"&gt;http://codespeak.net:8099/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Sandboxing support: It is possible to translate the Python
interpreter in a special way so that the result is fully sandboxed.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://codespeak.net/pypy/dist/pypy/doc/sandbox.html"&gt;http://codespeak.net/pypy/dist/pypy/doc/sandbox.html&lt;/a&gt;
&lt;a class="reference external" href="http://blog.sandbox.lt/en/WSGI%20and%20PyPy%20sandbox"&gt;http://blog.sandbox.lt/en/WSGI%20and%20PyPy%20sandbox&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class="section" id="other-changes"&gt;
&lt;h2&gt;Other Changes&lt;/h2&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p class="first"&gt;The &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;clr&lt;/span&gt;&lt;/tt&gt; module was greatly improved. This module is used to
interface with .NET libraries when translating the Python
interpreter to the CLI.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://codespeak.net/pypy/dist/pypy/doc/clr-module.html"&gt;http://codespeak.net/pypy/dist/pypy/doc/clr-module.html&lt;/a&gt;
&lt;a class="reference external" href="http://morepypy.blogspot.com/2008/01/pypynet-goes-windows-forms.html"&gt;http://morepypy.blogspot.com/2008/01/pypynet-goes-windows-forms.html&lt;/a&gt;
&lt;a class="reference external" href="http://morepypy.blogspot.com/2008/01/improve-net-integration.html"&gt;http://morepypy.blogspot.com/2008/01/improve-net-integration.html&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Stackless improvements: PyPy's &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;stackless&lt;/span&gt;&lt;/tt&gt; module is now more
complete. We added channel preferences which change details of the
scheduling semantics. In addition, the pickling of tasklets has been
improved to work in more cases.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Classic classes are enabled by default now. In addition, they have
been greatly optimized and debugged:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://morepypy.blogspot.com/2007/12/faster-implementation-of-classic.html"&gt;http://morepypy.blogspot.com/2007/12/faster-implementation-of-classic.html&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;PyPy's Python interpreter can be translated to Java bytecode now to
produce a pypy-jvm. At the moment there is no integration with
Java libraries yet, so this is not really useful.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;We added cross-compilation machinery to our translation toolchain to
make it possible to cross-compile our Python interpreter to Nokia's
Maemo platform:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://codespeak.net/pypy/dist/pypy/doc/maemo.html"&gt;http://codespeak.net/pypy/dist/pypy/doc/maemo.html&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Some effort was spent to make the Python interpreter more
memory-efficient. This includes the implementation of a mark-compact
GC which uses less memory than other GCs during collection.
Additionally there were various optimizations that make Python
objects smaller, e.g. class instances are often only 50% of the size
of CPython.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://morepypy.blogspot.com/2008/10/dsseldorf-sprint-report-days-1-3.html"&gt;http://morepypy.blogspot.com/2008/10/dsseldorf-sprint-report-days-1-3.html&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The support for the trace hook in the Python interpreter was
improved to be able to trace the execution of builtin functions and
methods. With this, we implemented the &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;_lsprof&lt;/span&gt;&lt;/tt&gt; module, which is
the core of the &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;cProfile&lt;/span&gt;&lt;/tt&gt; module.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;A number of rarely used features of PyPy were removed since the previous
release because they were unmaintained and/or buggy. Those are: The
LLVM and the JS backends, the aspect-oriented programming features,
the logic object space, the extension compiler and the first
incarnation of the JIT generator. The new JIT generator is in active
development, but not included in the release.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://codespeak.net/pipermail/pypy-dev/2009q2/005143.html"&gt;http://codespeak.net/pipermail/pypy-dev/2009q2/005143.html&lt;/a&gt;
&lt;a class="reference external" href="http://morepypy.blogspot.com/2009/03/good-news-everyone.html"&gt;http://morepypy.blogspot.com/2009/03/good-news-everyone.html&lt;/a&gt;
&lt;a class="reference external" href="http://morepypy.blogspot.com/2009/03/jit-bit-of-look-inside.html"&gt;http://morepypy.blogspot.com/2009/03/jit-bit-of-look-inside.html&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class="section" id="what-is-pypy"&gt;
&lt;h2&gt;What is PyPy?&lt;/h2&gt;
&lt;p&gt;Technically, PyPy is both a Python interpreter implementation and an
advanced compiler, or more precisely a framework for implementing dynamic
languages and generating virtual machines for them.&lt;/p&gt;
&lt;p&gt;The framework allows for alternative frontends and for alternative
backends, currently C, Java and .NET.  For our main target "C", we can
"mix in" different garbage collectors and threading models,
including micro-threads aka "Stackless".  The inherent complexity that
arises from this ambitious approach is mostly kept away from the Python
interpreter implementation, our main frontend.&lt;/p&gt;
&lt;p&gt;Socially, PyPy is a collaborative effort of many individuals working
together in a distributed and sprint-driven way since 2003.  PyPy would
not have gotten as far as it has without the coding, feedback and
general support from numerous people.&lt;/p&gt;
&lt;p&gt;Have fun,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;the PyPy release team, [in alphabetical order]&lt;/p&gt;
&lt;p&gt;Amaury Forgeot d'Arc, Anders Hammerquist, Antonio Cuni, Armin Rigo,
Carl Friedrich Bolz, Christian Tismer, Holger Krekel,
Maciek Fijalkowski, Samuele Pedroni&lt;/p&gt;
&lt;p&gt;and many others:
&lt;a class="reference external" href="http://codespeak.net/pypy/dist/pypy/doc/contributor.html"&gt;http://codespeak.net/pypy/dist/pypy/doc/contributor.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-4604559533184706699?l=morepypy.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/RolsK9Z70xQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/4604559533184706699/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=4604559533184706699" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/4604559533184706699?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/4604559533184706699?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/RolsK9Z70xQ/beta-for-110-released.html" title="Beta for 1.1.0 released" /><author><name>Carl Friedrich Bolz</name><uri>http://www.blogger.com/profile/00518922641059511014</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13192987955131835812" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">6</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/04/beta-for-110-released.html</feedburner:origLink></entry></feed>
