[pypy-svn] r80175 - in pypy/extradoc/talk/pepm2011/presentation: . figures

cfbolz at codespeak.net cfbolz at codespeak.net
Wed Jan 5 21:47:50 CET 2011


Author: cfbolz
Date: Wed Jan  5 21:47:48 2011
New Revision: 80175

Added:
   pypy/extradoc/talk/pepm2011/presentation/figures/get01.pdf   (contents, props changed)
   pypy/extradoc/talk/pepm2011/presentation/figures/get02.pdf   (contents, props changed)
   pypy/extradoc/talk/pepm2011/presentation/figures/guard01.pdf   (contents, props changed)
   pypy/extradoc/talk/pepm2011/presentation/figures/guard02.pdf   (contents, props changed)
   pypy/extradoc/talk/pepm2011/presentation/figures/guard03.pdf   (contents, props changed)
   pypy/extradoc/talk/pepm2011/presentation/figures/guard04.pdf
   pypy/extradoc/talk/pepm2011/presentation/figures/heap01.pdf   (contents, props changed)
   pypy/extradoc/talk/pepm2011/presentation/figures/heap02.pdf
   pypy/extradoc/talk/pepm2011/presentation/figures/heap03.pdf   (contents, props changed)
   pypy/extradoc/talk/pepm2011/presentation/figures/new01.pdf   (contents, props changed)
   pypy/extradoc/talk/pepm2011/presentation/figures/new02.pdf   (contents, props changed)
   pypy/extradoc/talk/pepm2011/presentation/figures/set01.pdf   (contents, props changed)
   pypy/extradoc/talk/pepm2011/presentation/figures/set02.pdf   (contents, props changed)
   pypy/extradoc/talk/pepm2011/presentation/talk.tex
Log:
start the talk. will become too long if I continue like this


Added: pypy/extradoc/talk/pepm2011/presentation/figures/get01.pdf
==============================================================================
Binary file. No diff available.

Added: pypy/extradoc/talk/pepm2011/presentation/figures/get02.pdf
==============================================================================
Binary file. No diff available.

Added: pypy/extradoc/talk/pepm2011/presentation/figures/guard01.pdf
==============================================================================
Binary file. No diff available.

Added: pypy/extradoc/talk/pepm2011/presentation/figures/guard02.pdf
==============================================================================
Binary file. No diff available.

Added: pypy/extradoc/talk/pepm2011/presentation/figures/guard03.pdf
==============================================================================
Binary file. No diff available.

Added: pypy/extradoc/talk/pepm2011/presentation/figures/guard04.pdf
==============================================================================
Files (empty file) and pypy/extradoc/talk/pepm2011/presentation/figures/guard04.pdf	Wed Jan  5 21:47:48 2011 differ

Added: pypy/extradoc/talk/pepm2011/presentation/figures/heap01.pdf
==============================================================================
Binary file. No diff available.

Added: pypy/extradoc/talk/pepm2011/presentation/figures/heap02.pdf
==============================================================================
Files (empty file) and pypy/extradoc/talk/pepm2011/presentation/figures/heap02.pdf	Wed Jan  5 21:47:48 2011 differ

Added: pypy/extradoc/talk/pepm2011/presentation/figures/heap03.pdf
==============================================================================
Binary file. No diff available.

Added: pypy/extradoc/talk/pepm2011/presentation/figures/new01.pdf
==============================================================================
Binary file. No diff available.

Added: pypy/extradoc/talk/pepm2011/presentation/figures/new02.pdf
==============================================================================
Binary file. No diff available.

Added: pypy/extradoc/talk/pepm2011/presentation/figures/set01.pdf
==============================================================================
Binary file. No diff available.

Added: pypy/extradoc/talk/pepm2011/presentation/figures/set02.pdf
==============================================================================
Binary file. No diff available.

Added: pypy/extradoc/talk/pepm2011/presentation/talk.tex
==============================================================================
--- (empty file)
+++ pypy/extradoc/talk/pepm2011/presentation/talk.tex	Wed Jan  5 21:47:48 2011
@@ -0,0 +1,317 @@
+\documentclass[utf8x]{beamer}
+
+% This file is a solution template for:
+
+% - Talk at a conference/colloquium.
+% - Talk length is about 20min.
+% - Style is ornate.
+
+\mode<presentation>
+{
+  \usetheme{Warsaw}
+  % or ...
+
+  %\setbeamercovered{transparent}
+  % or whatever (possibly just delete it)
+}
+
+
+\usepackage[english]{babel}
+\usepackage{listings}
+
+\usepackage[utf8x]{inputenc}
+% or whatever
+
+% Or whatever. Note that the encoding and the font should match. If T1
+% does not look nice, try deleting the line with the fontenc.
+
+
+\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}
+% - 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
+
+ merlinux GmbH, Hildesheim, Germany \and
+
+ Open End, Göteborg, Sweden \and
+}
+
+\date{2011 Workshop on Partial Evaluation and Program Manipulation, January 24, 2011}
+% - Either use conference name or its abbreviation.
+% - Not really informative to the audience, more for people (including
+%   yourself) who are reading the slides online
+
+
+% If you have a file called "university-logo-filename.xxx", where xxx
+% is a graphic format that can be processed by latex or pdflatex,
+% resp., then you can add a logo as follows:
+
+
+
+
+% Delete this, if you do not want the table of contents to pop up at
+% the beginning of each subsection:
+%\AtBeginSubsection[]
+%{
+%  \begin{frame}<beamer>
+%    \frametitle{Outline}
+%    \tableofcontents[currentsection,currentsubsection]
+%  \end{frame}
+%}
+
+
+% If you wish to uncover everything in a step-wise fashion, uncomment
+% the following command: 
+
+%\beamerdefaultoverlayspecification{<+->}
+
+
+\begin{document}
+
+\begin{frame}
+  \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
+% solution: 
+
+% - Exactly two or three sections (other than the summary).
+% - At *most* three subsections per section.
+% - Talk about 30s to 2min per frame. So there should be between about
+%   15 and 30 frames, all told.
+
+% - A conference audience is likely to know very little of what you
+%   are going to talk about. So *simplify*!
+% - In a 20min talk, getting the main ideas across is hard
+%   enough. Leave out details, even if it means being less precise than
+%   you think necessary.
+% - If you omit details that are vital to the proof/implementation,
+%   just say so once. Everybody will be happy with that.
+
+\begin{frame}
+  \frametitle{Dynamic Languages are Slow}
+  \begin{itemize}
+      \item Interpretation overhead
+      \item Constant type dispatching
+      \item Boxing of primitive types
+      \pause
+      \begin{itemize}
+          \item A lot of allocation of short-lived objects
+      \end{itemize}
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Dynamic Languages are Slow: Example}
+  Evaluate \texttt{x = a + b; y = x + c} in an interpreter:
+  \pause
+  \begin{enumerate}
+      \item What's the type of a? \texttt{Integer}
+      \item What's the type of b? \texttt{Integer}
+  \pause
+      \item unbox a
+      \item unbox b
+      \item compute the sum
+      \item box the result
+      \item store into x
+  \pause
+      \item What's the type of x? \texttt{Integer}
+      \item What's the type of c? \texttt{Integer}
+  \pause
+      \item unbox x
+      \item unbox c
+      \item compute the sum
+      \item box the result
+      \item store into y
+  \end{enumerate}
+\end{frame}
+
+\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}
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Context: The PyPy Project}
+  A general environment for implementing dynamic languages
+  \pause
+  \begin{block}{Approach}
+      \begin{itemize}
+          \item write an interpreter for the language in RPython
+          \item compilable to an efficient C-based VM
+          \pause
+          \item (RPython is a restricted subset of Python)
+      \end{itemize}
+  \end{block}
+\end{frame}
+
+\begin{frame}
+  \frametitle{PyPy's Tracing JIT}
+  the feature that makes PyPy interesting:
+  \begin{itemize}
+      \item a meta-JIT, applicable to many languages
+      \item needs a few source-code hints (or user annotations) in the interpreter
+      \item JIT is a tracing JIT compiler
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Tracing JITs}
+  \begin{itemize}
+      \item VM contains both an interpreter and the tracing JIT compiler
+      \item JIT works by observing and logging what the interpreter does
+      \item for interesting, commonly executed code paths
+      \item produces a linear list of operations (trace)
+      \item trace is optimized turned into machine code
+  \end{itemize}
+\end{frame}
+
+\begin{frame}[containsverbatim]
+  \frametitle{Example Trace}
+  Trace of \texttt{x = a + b; y = x + c}:
+\begin{verbatim}
+guard_class(a, Integer)
+guard_class(b, Integer)
+i1 = get(a, intval)
+i2 = get(b, intval)
+i3 = int_add(i1, i2)
+x = new(Integer)
+set(x, intval, i3)
+\end{verbatim}
+\pause
+\begin{verbatim}
+guard_class(x, Integer)
+guard_class(c, Integer)
+i4 = get(x, intval)
+i5 = get(c, intval)
+i6 = int_add(i4, i5)
+y = new(Integer)
+set(y, intval, i6)
+\end{verbatim}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Tracing JIT: Advantages}
+  \begin{itemize}
+      \item Traces are interesting linear pieces of code
+      \item most of the time correspond to loops
+      \item everything called in the trace is inlined
+      \item can perform good optimizations on the loop
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Optimizing the Heap Operations in a Trace}
+  \begin{itemize}
+      \item Contribution of our paper
+      \item A simple, efficient and effective optimization of heap operations in a trace
+      \item using online partial evaluation
+  \end{itemize}
+\end{frame}
+
+
+\begin{frame}
+  \frametitle{Heap Model}
+  \includegraphics[scale=0.9]{figures/heap01}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Heap Model}
+  \includegraphics[scale=0.9]{figures/heap02}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Heap Model}
+  \includegraphics[scale=0.9]{figures/heap03}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Operations: New}
+  \includegraphics[scale=0.8]{figures/new01}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Operations: New}
+  \includegraphics[scale=0.8]{figures/new02}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Operations: Get}
+  \includegraphics[scale=0.8]{figures/get01}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Operations: Get}
+  \includegraphics[scale=0.8]{figures/get02}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Operations: Set}
+  \includegraphics[scale=0.8]{figures/set01}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Operations: Set}
+  \includegraphics[scale=0.8]{figures/set02}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Operations: Guard}
+  \includegraphics[scale=0.8]{figures/guard01}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Operations: Guard}
+  \includegraphics[scale=0.8]{figures/guard02}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Operations: Guard}
+  \includegraphics[scale=0.8]{figures/guard03}
+\end{frame}
+
+\begin{frame}[plain]
+  \frametitle{Operations: Guard}
+  \includegraphics[scale=0.8]{figures/guard04}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Conclusion}
+  \begin{itemize}
+      \item straightforward interpreter can be efficient, given enough technology
+      \item successful application of partial evaluation
+      \item Prolog can benefit from dynamic compilation
+  \end{itemize}
+  \pause
+  \begin{block}{Future}
+      \begin{itemize}
+          \item Scale up to larger programs
+          \item need some optimization on the interpreter level – indexing
+          \item investigate memory usage
+      \end{itemize}
+  \end{block}
+\end{frame}
+
+
+\end{document}
+
+



More information about the Pypy-commit mailing list