# [pypy-svn] r60665 - pypy/extradoc/talk/ecoop2009

antocuni at codespeak.net antocuni at codespeak.net
Sun Dec 21 10:27:31 CET 2008

Author: antocuni
Date: Sun Dec 21 10:27:28 2008
New Revision: 60665

Modified:
Log:
add conclusion and future work

==============================================================================
+++ pypy/extradoc/talk/ecoop2009/clibackend.tex	Sun Dec 21 10:27:28 2008
@@ -3,6 +3,8 @@

\subsection{JIT layering}

+%\anto{Mention Reflection.Emit}
+
From the implementation point of view, the JIT generator is divided into a
frontend and several backends.  The goal of the frontend is to generate a JIT
compiler which works as described in the previous sections.  Internally, the

==============================================================================
+++ pypy/extradoc/talk/ecoop2009/conclusion.tex	Sun Dec 21 10:27:28 2008
@@ -54,25 +54,41 @@
\cite{Blanchet99escapeanalysis}, \cite{Choi99escapeanalysis} our algorithm is
totally simple-minded, but it is still useful in practise.

-\commentout{
-\section{Future work}
+\section{Conclusion and Future Work}

-XXX to be written
-}
+In this paper we presented PyPy's JIT compiler generator, based on partial
+evaluation techniques, which can automatically turn an interpreter into a JIT
+compiler, requiring the language developers to only add few \texttt{hint}s to
+guide the generation process.
+
+We showed that classical partial evaluation cannot remove all the overhead
+proper of dynamically typed languages, and how the new operation called
+\emph{promotion} solves the problem, by delaying compile-time until the JIT
+knows enough to produce efficient code, and by continuously intermixing
+compile-time and runtime.  Moreover, we showed that our simple but still
+practically useful technique to avoid allocation of intermediate unnecessary
+objects plays well with promotion and helps to produce even better code.
+
+Finally, we presented the CLI backend for PyPy's JIT compiler generator, whose
+goal is to produce .NET bytecode at runtime.  We showed how it is possible to
+circumvent intrinsic limitations of the virtual machine to implement
+promotion.  As a result, we proved that the idea of \emph{JIT layering} is
+worth of further exploration, as it makes possible for dynamically typed
+languages to be even faster than their statically typed counterpart in some
+circumstances.
+
+As a future work, we want to explore different strategies to make the frontend
+producing less code, maintaining comparable or better performances.  In
+particular, we are working on a way to automatically detect loops in the user
+code, as tracing JITs do \cite{gal_hotpathvm_2006}.  By compilining whole
+loops at once, the backends should be able to produce better code than today.
+
+At the moment, some bugs and minor missing features prevent the CLI JIT
+backend to handle more complex languages such as Python and Smalltalk.  We are
+confident that once these problems will be fixed, we will get performance
+results comparable to TLC, as the other backends already demonstrate
+\cite{PyPyJIT}.  Moreover, if the current implementation of flexswitches will
+prove to be too slow for some purposes, we want to explore alternative
+implementation strategies, also considering the new features that might be
+integrated into virtual machines.

-\section{Conclusion}
-
-high level structure:
-
-1. We presented PyPy JIT generator
-
-2. interpreters can exploit the JIT generator by placing few hints here and
-there to guide the generation of code
-
-3. generated JITs produce fast code thanks to \textbf{promotion} (our first
-contribution) and automatic unboxing
-
-4. we presented a way to implement promotion/flexswitches on top of .NET
-
-5. our second contribution is to show that the idea of JIT layering can work
-well, as for some cases we can get performances even better than C\#

==============================================================================
+++ pypy/extradoc/talk/ecoop2009/main.bbl	Sun Dec 21 10:27:28 2008
@@ -111,6 +111,12 @@
\newblock {How to not write Virtual Machines for Dynamic Languages }.
\newblock In {\em Proceeding of Dyla 2007 (to appear)}, pages~--, 2007.

+\bibitem{PyPyJIT}
+Armin Rigo and Samuele Pedroni.
+\newblock {JIT} compiler architecture.
+\newblock Technical Report D08.2, PyPy Consortium, 2007.
+\newblock http://codespeak.net/pypy/dist/pypy/doc/index-report.html.
+
\bibitem{sullivan_dynamic_2001}
Gregory~T. Sullivan.
\newblock Dynamic partial evaluation.

==============================================================================
+++ pypy/extradoc/talk/ecoop2009/main.bib	Sun Dec 21 10:27:28 2008
@@ -220,3 +220,12 @@
publisher = {ACM},
address = {New York, NY, USA},
}
+
+ at techreport{PyPyJIT,
+    title = "{JIT} Compiler Architecture",
+    author = {Armin Rigo and Samuele Pedroni},
+    year = "2007",
+    institution = "PyPy Consortium",
+    number = "D08.2",
+    note = "http://codespeak.net/pypy/dist/pypy/doc/index-report.html"
+}