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

cfbolz at codespeak.net cfbolz at codespeak.net
Tue Jan 11 15:56:10 CET 2011


Author: cfbolz
Date: Tue Jan 11 15:56:08 2011
New Revision: 80193

Modified:
   pypy/extradoc/talk/pepm2011/presentation/talk.tex
Log:
continue working on the talk. will have to do things differently, the diagrams
are nice but take way too much space.


Modified: pypy/extradoc/talk/pepm2011/presentation/talk.tex
==============================================================================
--- pypy/extradoc/talk/pepm2011/presentation/talk.tex	(original)
+++ pypy/extradoc/talk/pepm2011/presentation/talk.tex	Tue Jan 11 15:56:08 2011
@@ -225,10 +225,18 @@
       \item Contribution of our paper
       \item A simple, efficient and effective optimization of heap operations in a trace
       \item using online partial evaluation
+      \item fully implemented an in use in large-scale interpreters
   \end{itemize}
+  \pause
+  \begin{block}{Ingredients}
+      \begin{itemize}
+          \item a slightly simplified model for objects on the heap
+          \item operational semantics of trace operations that manipulate the heap
+          \item optimization rules for those operations
+      \end{itemize}
+  \end{block}
 \end{frame}
 
-
 \begin{frame}
   \frametitle{Heap Model}
   \includegraphics[scale=0.9]{figures/heap01}
@@ -244,6 +252,16 @@
   \includegraphics[scale=0.9]{figures/heap03}
 \end{frame}
 
+\begin{frame}
+  \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{guard(v, T)} checks the type of an object
+  \end{itemize}
+\end{frame}
+
 \begin{frame}[plain]
   \frametitle{Operations: New}
   \includegraphics[scale=0.8]{figures/new01}
@@ -295,6 +313,122 @@
 \end{frame}
 
 \begin{frame}
+  \frametitle{Optimization by Online Partial Evaluation}
+  \begin{itemize}
+      \item Trace is optimized using online partial evaluation
+      \item part of the runtime heap is modelled in the \emph{static heap}
+      \item static heap contains objects that are allocated within the trace
+      \item (as opposed to before the trace is executed)
+      \pause
+      \item operations acting on the static heap can be removed
+      \item all others need to be residualized
+      \item all fairly straightforward
+  \end{itemize}
+\end{frame}
+
+
+\begin{frame}[plain]
+  \frametitle{Optimizing New}
+  \includegraphics[scale=0.8]{figures/opt_new1}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Optimizing New}
+  \includegraphics[scale=0.8]{figures/opt_new2}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Optimizing Get}
+  \includegraphics[scale=0.8]{figures/opt_get1}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Optimizing Get}
+  \includegraphics[scale=0.8]{figures/opt_get2}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Optimizing Get}
+  \includegraphics[scale=0.8]{figures/opt_get3}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Optimizing Get}
+  \includegraphics[scale=0.8]{figures/opt_get4}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Optimizing Guard}
+  \includegraphics[scale=0.8]{figures/opt_guard1}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Optimizing Guard}
+  \includegraphics[scale=0.8]{figures/opt_guard2}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Optimizing Guard}
+  \includegraphics[scale=0.8]{figures/opt_guard3}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Optimizing Guard}
+  \includegraphics[scale=0.8]{figures/opt_guard4}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Optimizing Set}
+  \includegraphics[scale=0.8]{figures/opt_set1}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Optimizing Set}
+  \includegraphics[scale=0.8]{figures/opt_set2}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Lifting}
+  Problem: What happens if we write a static object into a dynamic one?
+  \pause
+  \begin{itemize}
+      \item lose track of the static object because of possibility of aliasing
+      \item need to \emph{lift} the static object
+      \item lifting produces operations that recreate the static object
+  \end{itemize}
+\end{frame}
+
+
+\begin{frame}[plain]
+  \frametitle{Optimizing Set}
+  \includegraphics[scale=0.8]{figures/opt_set_dynamic1}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Optimizing Set}
+  \includegraphics[scale=0.8]{figures/opt_set_dynamic2}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Benchmark Results}
+  \begin{itemize}
+      \item to evaluate the optimization we used PyPy's Python interpreter with real-world programs
+      \item optimization can remove
+      \begin{itemize}
+          \item 70\% of all \texttt{new} operations
+          \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 outperforming standard Python on all benchmarks but one
+      \pause
+      \item more details in the paper
+      \end{itemize}
+  \end{itemize}
+\end{frame}
+
+
+\begin{frame}
   \frametitle{Conclusion}
   \begin{itemize}
       \item straightforward interpreter can be efficient, given enough technology



More information about the Pypy-commit mailing list