<?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;A0UEQn8_fCp7ImA9WxNUFUU.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152</id><updated>2009-11-07T02:20:03.144-08: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>113</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;A0IASXg4fSp7ImA9WxNUFEQ.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-7608527610228870250</id><published>2009-11-06T01:23:00.000-08:00</published><updated>2009-11-06T01:25:48.635-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-06T01:25:48.635-08: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'/&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="0 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">0</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-03T08:38:00.001-08:00</published><updated>2009-11-07T02:20:03.153-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-07T02:20:03.153-08: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'/&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-01T10:59:00.000-08:00</published><updated>2009-11-02T07:59:48.562-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-02T07:59:48.562-08: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'/&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-16T07:27:00.000-07:00</published><updated>2009-10-16T09:23:37.627-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-16T09:23:37.627-07: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'/&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-15T06:36:00.000-07:00</published><updated>2009-10-15T06:46:03.527-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-15T06:46:03.527-07: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'/&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-06T07:47:00.000-07:00</published><updated>2009-10-09T08:34:13.852-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-09T08:34:13.852-07: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'/&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-27T08:51:00.000-07:00</published><updated>2009-09-27T14:49:08.993-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-27T14:49:08.993-07: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'/&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="41 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">41</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-24T09:30:00.000-07:00</published><updated>2009-09-24T09:32:15.089-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-24T09:32:15.089-07: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'/&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-25T08:05:00.000-07:00</published><updated>2009-08-25T11:43:08.295-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-25T11:43:08.295-07: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'/&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-25T04:43:00.000-07:00</published><updated>2009-08-25T10:46:00.858-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-25T10:46:00.858-07: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'/&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-17T10:40:00.000-07:00</published><updated>2009-07-17T10:45:42.391-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-17T10:45:42.391-07: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'/&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-16T07:38:00.000-07:00</published><updated>2009-07-16T07:39:42.938-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-16T07:39:42.938-07: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'/&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-23T13:58:00.000-07:00</published><updated>2009-06-23T14:03:43.483-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-23T14:03:43.483-07: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'/&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-23T12:56:00.000-07:00</published><updated>2009-08-25T10:46:38.193-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-25T10:46:38.193-07: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'/&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-15T15:59:00.000-07:00</published><updated>2009-08-25T10:47:00.184-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-25T10:47:00.184-07: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'/&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-16T02:24:00.000-07:00</published><updated>2009-08-25T10:47:40.497-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-25T10:47:40.497-07: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'/&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-30T14:40:00.000-07:00</published><updated>2009-08-25T10:47:54.830-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-25T10:47:54.830-07: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'/&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-28T07:39:00.000-07:00</published><updated>2009-04-28T07:49:00.280-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-28T07:49:00.280-07: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'/&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-21T11:38:00.000-07:00</published><updated>2009-04-21T11:42:00.530-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-21T11:42:00.530-07: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'/&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-21T07:47:00.000-07:00</published><updated>2009-04-21T07:53:44.773-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-21T07:53:44.773-07: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'/&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-19T14:33:00.000-07:00</published><updated>2009-04-19T15:18:08.376-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-19T15:18:08.376-07: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'/&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><entry gd:etag="W/&quot;DkEEQH07eip7ImA9WxVaGEw.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-4551365436232104640</id><published>2009-04-15T09:52:00.001-07:00</published><updated>2009-04-15T09:56:41.302-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-15T09:56:41.302-07:00</app:edited><title>Leysin Sprint Started</title><content type="html">The Leysin Sprint started today. The weather is great and the view is wonderful, as usual. Technically we are working on the &lt;a href="http://codespeak.net:8099/summary"&gt;remaining test failures&lt;/a&gt; of the nightly test runs and are generally trying to fix various long-postponed bugs. I will try to give more detailed reports as the sprint progresses.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-4551365436232104640?l=morepypy.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/LXyq9pyglnw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/4551365436232104640/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=4551365436232104640" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/4551365436232104640?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/4551365436232104640?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/LXyq9pyglnw/leysin-sprint-started.html" title="Leysin 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">0</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/04/leysin-sprint-started.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUcGQH45eSp7ImA9WxVaEk0.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-909873128878039557</id><published>2009-04-06T16:51:00.001-07:00</published><updated>2009-04-08T09:10:21.021-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-08T09:10:21.021-07:00</app:edited><title>Pycon videos are online</title><content type="html">Hi.
&lt;p&gt;
We didn't yet write full pycon summary, but both of our talks are now online: &lt;a href="http://blip.tv/file/1957282"&gt;PyPy status talk&lt;/a&gt; and &lt;a href="http://blip.tv/file/1956957"&gt;python in a sandbox&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Update:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Slides are also available: &lt;a href="http://codespeak.net/svn/pypy/extradoc/talk/pycon2009/status/status.pdf"&gt;PyPy status talk&lt;/a&gt; and &lt;a href="http://codespeak.net/svn/pypy/extradoc/talk/pycon2009/pypy-sandbox/sandbox.pdf"&gt;Python in a sandbox&lt;/a&gt;.&lt;/p&gt;

&lt;/p&gt;
Enjoy!&lt;br/&gt;
fijal &amp; holger&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-909873128878039557?l=morepypy.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/dRCIDvM0lL8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/909873128878039557/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=909873128878039557" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/909873128878039557?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/909873128878039557?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/dRCIDvM0lL8/pycon-videos-are-online.html" title="Pycon videos are online" /><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">1</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/04/pycon-videos-are-online.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkANQ38-cSp7ImA9WxVbEEo.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-8755773725359396485</id><published>2009-03-26T05:18:00.000-07:00</published><updated>2009-03-26T05:33:12.159-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-26T05:33:12.159-07:00</app:edited><title>VM summit: nice to see friendly competition</title><content type="html">&lt;p&gt;
So Google has launched the &lt;a href="http://code.google.com/p/unladen-swallow/"&gt;unladen swallow&lt;/a&gt; project
with this first goal: 
&lt;/p&gt;
&lt;pre&gt;
    Produce a version of Python at least 5x faster than CPython.
&lt;/pre&gt;
&lt;p&gt;
We discussed some details with Collin Winter,  Jeffrey Yasskin and Thomas Wouters
during the VM summit yesterday. We were a bit confused about usage
of the term JIT, because as far as we understood, it's going to be upfront
compilation into LLVM.  In the past we have looked into LLVM
 –  at one point PyPy extensively use it but it
wasn't clear how we could make good use to it. 
They also consider changing to something else than LLVM.  It's gonna be 
interesting to see how this works out. 
&lt;/p&gt;
&lt;p&gt;
It's good to see friendly competition, and we think that should take up
the challenge and see if we can produce faster pickling, run 2to3 and 
Django faster than what they can come up with.  We also talked 
to IronPython and Jython developers and all agreed that some
common benchmarks would be good.  And maybe do weekly
press releases about small speed increases? :) 
&lt;/p&gt;
&lt;p&gt;
The idea of the VM summit here in Chicago was to bring together implementors
of various virtual machine languages.  There were members of the communities of
IronPython, CPython, GemStone's MagLev, Rubinius, Mozilla's TraceMonkey, Parrot, 
Sun's Da Vinci Machine, Microsoft's DLR, Jython and JRuby.
Everybody got to talk 5-10 minutes on their current status and 
challenges.  It is clear that you cannot begin to cover the 
complexities and architectures of the involved projects. 
But that wasn't too much of a problem because the rest of
the day everybody freely and dynamically grouped on their
issues of choice.  We established some more personal contacts,
was great to chat with people like Andreas Gal from the University of 
California, Irvine, who have a very similar idea about the JIT
that we have.  Actually, we could probably haved mixed our
two presentations and nobody would have actually noticed :-).
&lt;/p&gt;
&lt;p&gt;
At the end of the presentation part, John Rose presented &lt;a
href="http://wiki.jvmlangsummit.com/preso/DaVinciAtPyCon/"&gt;his
slides&lt;/a&gt;. John is a Hotspot developer, and while not precisely a dynamic
language implementor, he has a lot of experience in virtual
machine implementation. It's very good to see the JVM being extended towards
supporting dynamic-language specific things, in order to be something
more than just a good platform for Java.  We'll probably have 
some extra meetup with him the next days. 
&lt;/p&gt;
cheers,&lt;br/&gt; 
holger and fijal&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-8755773725359396485?l=morepypy.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/GQfg4Smt2LI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/8755773725359396485/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=8755773725359396485" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/8755773725359396485?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/8755773725359396485?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/GQfg4Smt2LI/vm-summit-nice-to-see-friendly.html" title="VM summit: nice to see friendly competition" /><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/03/vm-summit-nice-to-see-friendly.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEICQng_eyp7ImA9WxVVGEs.&quot;"><id>tag:blogger.com,1999:blog-3971202189709462152.post-5135830287297423499</id><published>2009-03-12T07:00:00.000-07:00</published><updated>2009-03-12T07:02:43.643-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-12T07:02:43.643-07:00</app:edited><title>PyPy talk at OpenBossa 09</title><content type="html">&lt;p&gt;Yesterday i gave my &lt;a class="reference external" href="http://merlinux.eu/~hpk/pypy-openbossa09.pdf"&gt;PyPy status/mobile perspectives&lt;/a&gt; at OpenBossa, Nokia's developer conference for embedded platforms in Brazil.  Found it a bit of a tough task to do that in 50 minutes.  I had some 50, later more developers attending the talk and was happy with the questions and the feedback.  Guess it's a good sign if the number of people grows during a talk :)  It was the first time i tried to work more with pictures and actually used some devianart photos from &lt;a class="reference external" href="http://marikaz.deviantart.com/"&gt;Marikaz&lt;/a&gt; to mark section transitions.  I summarize/highlight some key points here in the post.&lt;/p&gt;
&lt;p&gt;After intro and 2.5 compatibility status, i talked about our measurements of PyPy's Python on Nokia's N810 internet tablet. The best bit is that for almost all Python data structures PyPy has smaller memory representations than CPython.  Particularly good are class instances which often score at 50% of CPython's sizes.  Startup time is also often better and can be improved.  On the bad side, PyPy's quite large base interpreter size and its bytecode execution is often worse. In the talk i also outline ideas for &amp;quot;perfect PYC files&amp;quot; for minimizing module import times and maximizing sharing across interpreter processes. I also briefly discussed the PyPy situation with extension modules and regarding C++ libs.  Most of these ideas arose from sprint discussions last year.  In the morning i also had some good talk with Stefan Seefeld about Boost Python and the new QT4 bindings.   Maybe to use Boost Python is also a good opportunity - but PyPy does not currently have a C-level or C++ level API.&lt;/p&gt;
&lt;p&gt;In subsequent lunch discussions people agreed that PyPy has three main interesting areas currently:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;the Python Just-In-Time Compiler&lt;/li&gt;
&lt;li&gt;a virtualized, sandboxed Python interpreter&lt;/li&gt;
&lt;li&gt;an efficient Python interpreter for small devices&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I think our upcoming 1.1 release will be a good point in time for many people to look some more into PyPy.  I hope we are crossing the chasm soon.  It's been a while since the project started :)  Getting some more sponsoring to sustain and increase our current efforts probably wouldn't hurt.&lt;/p&gt;
&lt;p&gt;Now i am off to spend my last day in Recife / Brazil, fly back to Germany in the evening and then spend time on preparing for Pycon 2009. And I guess i am going to enjoy some naturally cold air - at least my two jogging sessions at Brazillian beaches, at a sustained 30 degrees celsius, were tough.  I guess i shouldn't complain, though :)&lt;/p&gt;
&lt;p&gt;Was great meeting all the brazillian guys and the few women - just had breakfeast with Kate Alhola, kernel hacker and working on the new &amp;quot;Freemantle&amp;quot; graphical platform.  Many thanks go to Marcio Marcedo and the Python team at &lt;a class="reference external" href="http://www.indt.org/institutional/index.php"&gt;INDT&lt;/a&gt; who invited me here.  Hope to come again next year and eventually talk more about the Zone VM :)&lt;/p&gt;
&lt;p&gt;If you are interested in some more not so pypy-specific bits about the conference and what i experienced, you might head over to my &lt;a class="reference external" href="http://tetamap.wordpress.com"&gt;tetamap&lt;/a&gt; blog.&lt;/p&gt;
&lt;p&gt;holger&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3971202189709462152-5135830287297423499?l=morepypy.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PyPyStatusBlog/~4/48w91P_4Mdc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://morepypy.blogspot.com/feeds/5135830287297423499/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=3971202189709462152&amp;postID=5135830287297423499" title="10 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/5135830287297423499?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3971202189709462152/posts/default/5135830287297423499?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PyPyStatusBlog/~3/48w91P_4Mdc/pypy-talk-at-openbossa-09.html" title="PyPy talk at OpenBossa 09" /><author><name>holger krekel</name><uri>http://www.blogger.com/profile/00985924698593515074</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="05257080973500257858" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">10</thr:total><feedburner:origLink>http://morepypy.blogspot.com/2009/03/pypy-talk-at-openbossa-09.html</feedburner:origLink></entry></feed>
