[pypy-svn] r80216 - pypy/extradoc/talk/pepm2011/presentation

cfbolz at codespeak.net cfbolz at codespeak.net
Wed Jan 19 11:01:04 CET 2011


Author: cfbolz
Date: Wed Jan 19 11:01:00 2011
New Revision: 80216

Modified:
   pypy/extradoc/talk/pepm2011/presentation/talk.tex
Log:
tweaks to the slides after the first test run


Modified: pypy/extradoc/talk/pepm2011/presentation/talk.tex
==============================================================================
--- pypy/extradoc/talk/pepm2011/presentation/talk.tex	(original)
+++ pypy/extradoc/talk/pepm2011/presentation/talk.tex	Wed Jan 19 11:01:00 2011
@@ -30,19 +30,17 @@
 
 \title{Allocation Removal by Partial Evaluation in a Tracing JIT}
 
-\author[Bolz et. al.]{\emph{Carl Friedrich Bolz}\inst{1} \and Antonio Cuni\inst{1} \and Maciej Fijałkowski\inst{2} \and Michael Leuschel\inst{1} \and \\
-            Samuele Pedroni\inst{3} \and Armin Rigo\inst{1}}
-\author{\emph{Carl Friedrich Bolz} \and Antonio Cuni \and Maciej Fijałkowski \and Michael Leuschel \and Samuele Pedroni \and Armin Rigo}
+\author[Carl Friedrich Bolz et. al.]{\emph{Carl Friedrich Bolz}\inst{1} \and Antonio Cuni\inst{1} \and Maciej Fijałkowski\inst{2} \and Michael Leuschel\inst{1} \and Samuele Pedroni\inst{3} \and Armin Rigo\inst{1}}
 % - Give the names in the same order as the appear in the paper.
 % - Use the \inst{?} command only if the authors have different
 %   affiliation.
 
 \institute[Heinrich-Heine-Universität Düsseldorf]
-{Heinrich-Heine-Universität Düsseldorf, STUPS Group, Germany \and
+{$^1$Heinrich-Heine-Universität Düsseldorf, STUPS Group, Germany \and
 
- merlinux GmbH, Hildesheim, Germany \and
+ $^2$merlinux GmbH, Hildesheim, Germany \and
 
- Open End, Göteborg, Sweden \and
+ $^3$Open End, Göteborg, Sweden \and
 }
 
 \date{2011 Workshop on Partial Evaluation and Program Manipulation, January 24, 2011}
@@ -81,12 +79,6 @@
   \titlepage
 \end{frame}
 
-%\begin{frame}
-%  \frametitle{Outline}
-%  \tableofcontents
-  % You might wish to add the option [pausesections]
-%\end{frame}
-
 
 % Structuring a talk is a difficult task and the following structure
 % may not be suitable. Here are some rules that apply for this
@@ -109,7 +101,7 @@
   \frametitle{Dynamic Languages are Slow}
   \begin{itemize}
       \item Interpretation overhead
-      \item Constant type dispatching
+      \item Type dispatching
       \item Boxing of primitive types
       \pause
       \begin{itemize}
@@ -131,6 +123,7 @@
       \item unbox a
       \item unbox b
       \item compute the sum
+  \pause
       \item box the result as an \texttt{Integer}
       \item store into x
   \pause
@@ -140,6 +133,7 @@
       \item unbox x
       \item unbox c
       \item compute the sum
+  \pause
       \item box the result as an \texttt{Integer}
       \item store into y
   \end{enumerate}
@@ -148,16 +142,24 @@
 \begin{frame}
   \frametitle{What to do?}
   \begin{itemize}
-      \item Hard to improve in an interpreter
       \item Use a JIT compiler
       \item \textbf{Add a optimization that can deal with heap operations}
       \pause
       \item optimize short-lived objects
+      \item remove some of the redundancy
   \end{itemize}
 \end{frame}
 
 \begin{frame}
-  \frametitle{Context: The PyPy Project}
+  \frametitle{Overview}
+  \tableofcontents
+  % You might wish to add the option [pausesections]
+\end{frame}
+
+\section{Experimental Context}
+
+\begin{frame}
+  \frametitle{Our Experimental Context is the PyPy Project}
   A general environment for implementing dynamic languages
   \pause
   \begin{block}{Approach}
@@ -171,7 +173,7 @@
 \end{frame}
 
 \begin{frame}
-  \frametitle{PyPy's Tracing JIT}
+  \frametitle{PyPy Uses a Novel Tracing JIT}
   the feature that makes PyPy interesting:
   \begin{itemize}
       \item a meta-JIT, applicable to many languages
@@ -181,7 +183,7 @@
 \end{frame}
 
 \begin{frame}
-  \frametitle{Tracing JITs}
+  \frametitle{Tracing JITs Compile by Observing an Interpreter}
   \begin{itemize}
       \item VM contains both an interpreter and the tracing JIT compiler
       \item JIT works by observing and logging what the interpreter does
@@ -238,8 +240,31 @@
 \end{verbatim}
 \end{frame}
 
+\begin{frame}[containsverbatim]
+  \frametitle{Optimized Example Trace}
+  Trace of \texttt{x = a + b; y = x + c}:
+\begin{alltt}
+guard_class(a, Integer)
+guard_class(b, Integer)
+i1 = get(a, intval)
+i2 = get(b, intval)
+i3 = int_add(i1, i2)
+\sout{x = new(Integer)}
+\sout{set(x, intval, i3)}
+\end{alltt}
+\begin{alltt}
+\sout{guard_class(x, Integer)}
+guard_class(c, Integer)
+\sout{i4 = get(x, intval)}
+i5 = get(c, intval)
+i6 = int_add(\emph{i3}, i5)
+y = new(Integer)
+set(y, intval, i6)
+\end{alltt}
+\end{frame}
+
 \begin{frame}
-  \frametitle{Tracing JIT: Advantages}
+  \frametitle{The Advantages of Tracing JITs}
   \begin{itemize}
       \item Traces are interesting linear pieces of code
       \item most of the time correspond to loops
@@ -249,6 +274,8 @@
   \end{itemize}
 \end{frame}
 
+\section{Proposed Optimization}
+
 \begin{frame}
   \frametitle{Optimizing the Heap Operations in a Trace}
   \begin{itemize}
@@ -286,8 +313,8 @@
   \frametitle{Operations Manipulating Heap Objects}
   \begin{itemize}
       \item \texttt{v = new(T)} makes a new object
-      \item \texttt{get(w, F)} reads a field out of an object
-      \item \texttt{u = set(v, F, w)} writes a field of an object
+      \item \texttt{u = get(w, F)} reads a field out of an object
+      \item \texttt{set(v, F, w)} writes a field of an object
       \item \texttt{guard(v, T)} checks the type of an object
   \end{itemize}
 \end{frame}
@@ -460,6 +487,7 @@
 \end{alltt}
 \end{frame}
 
+\section{Benchmarks}
 
 \begin{frame}
   \frametitle{Benchmark Results}
@@ -471,7 +499,7 @@
           \item 14\% of all \texttt{get/set} operations
           \item 93\% of all \texttt{guard} operations
       \pause
-      \item Timings improve by a factor between 1.2 and 6.95
+      \item Timings improve by a factor between 1.1 and 6.95
       \item outperforming standard Python on all benchmarks but one
       \pause
       \item more details in the paper
@@ -479,28 +507,24 @@
   \end{itemize}
 \end{frame}
 
-
 \begin{frame}
   \frametitle{Conclusion}
   \begin{itemize}
-      \item very simple partial-evaluation-based optimization
-      \item can remove a lot of allocations and type checks in practical programs
-      \item no control issues
-      \item all control decisions made by the tracer
-      \item based on observing executing program
+      \item We propose a very simple partial-evaluation-based optimization for tracing
+      JITs of dynamic languages that:
+      \begin{itemize}
+          \item can remove a lot of allocations and type checks in practical
+          programs. 
+          \item is efficient and effective.
+          \item has no control issues because all control decisions are made by
+          the tracing JIT.
+      \end{itemize}
+      \pause
+      \item We claim that this is a general strategy to get rid of control
+      problems by simply observing the runtime behaviour of the program.
   \end{itemize}
 \end{frame}
 
-\begin{frame}
-  \frametitle{Questions?}
-  \begin{itemize}
-      \item very simple partial-evaluation-based optimization for tracing JITs of dynamic languages
-      \item can remove a lot of allocations and type checks in practical programs
-      \item no control issues
-      \item all control decisions made by the tracing JIT
-      \item based on observing executing program
-  \end{itemize}
-\end{frame}
 
 \begin{frame}
   \frametitle{Backup Slides}



More information about the Pypy-commit mailing list