[pypy-commit] extradoc extradoc: QUICKLY prepare the slides for the teaser talk (which we will give in ~1.5h)
antocuni
noreply at buildbot.pypy.org
Mon Jun 20 15:17:43 CEST 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: extradoc
Changeset: r3752:8c74dc0fde07
Date: 2011-06-20 15:17 +0200
http://bitbucket.org/pypy/extradoc/changeset/8c74dc0fde07/
Log: QUICKLY prepare the slides for the teaser talk (which we will give
in ~1.5h)
diff --git a/talk/ep2011/training/Makefile b/talk/ep2011/training/Makefile
--- a/talk/ep2011/training/Makefile
+++ b/talk/ep2011/training/Makefile
@@ -10,6 +10,12 @@
sed 's/\\maketitle/\\input{title.latex}/' -i talk.latex || exit
pdflatex talk.latex || exit
+teaser.pdf: teaser.rst author.latex title.latex stylesheet.latex
+ rst2beamer.py --stylesheet=stylesheet.latex --documentoptions=14pt teaser.rst teaser.latex || exit
+ sed 's/\\date{}/\\input{author.latex}/' -i teaser.latex || exit
+ sed 's/\\maketitle/\\input{title.latex}/' -i teaser.latex || exit
+ pdflatex teaser.latex || exit
+
view: talk.pdf
evince talk.pdf &
diff --git a/talk/ep2011/training/author.latex b/talk/ep2011/training/author.latex
--- a/talk/ep2011/training/author.latex
+++ b/talk/ep2011/training/author.latex
@@ -5,4 +5,4 @@
{Antonio Cuni \\ Armin Rigo}
\institute{EuroPython 2011}
-\date{June 21 2011}
+\date{June 20 2011}
diff --git a/talk/ep2011/training/talk.rst b/talk/ep2011/training/teaser.rst
copy from talk/ep2011/training/talk.rst
copy to talk/ep2011/training/teaser.rst
--- a/talk/ep2011/training/talk.rst
+++ b/talk/ep2011/training/teaser.rst
@@ -4,6 +4,29 @@
PyPy training session
================================
+What is PyPy?
+-------------------------
+
+* PyPy
+
+ - started in 2003
+
+ - Open Source, partially funded by EU and others
+
+ - framework for fast dynamic languages
+
+ - Python implementation
+
+
+Speed
+------
+
+.. image:: ../talk/pypy-vs-cpython.png
+ :scale: 40%
+ :align: center
+
+
+
PyPy training session
---------------------
@@ -12,12 +35,6 @@
- Part 2: Write your own interpreter with PyPy
-Part 1
-------
-
-* Run your application under PyPy
-
-
How to run PyPy
----------------
@@ -43,67 +60,56 @@
* fix it!
-Refcounting vs generational GC (1)
-----------------------------------
-|scriptsize|
-|example<| |scriptsize| ``gc0.py`` |end_scriptsize| |>|
-.. sourcecode:: python
+Just-in-Time Compilation
+------------------------
- def foo():
- f = file('/tmp/bar.txt', 'w')
- f.write('hello world')
+* Tracing JIT, like TraceMonkey
- foo()
- print file('/tmp/bar.txt').read()
+* Complete by construction
-|end_example|
+* Supports Intel x86, amd64, and soon ARM
-|pause|
-|example<| |scriptsize| ``gc1.py`` |end_scriptsize| |>|
-.. sourcecode:: python
+Short introduction to JITting
+-----------------------------
- def foo():
- f = file('/tmp/bar.txt', 'w')
- f.write('hello world')
- f.close() # <-------
+* run code with the interpreter
-|end_example|
+* observe what it does
-|pause|
-|example<| |scriptsize| ``gc2.py`` |end_scriptsize| |>|
+* generate optimized machine code for commonly executed paths
-.. sourcecode:: python
+* using runtime knowledge (types, paths taken)
- def foo():
- with file('/tmp/bar.txt', 'w') as f:
- f.write('hello world')
+Tracing JIT
+-----------
-|end_example|
-|end_scriptsize|
+* compiles one loop at a time
+* generates linear code paths, recording what the interpreter did
-Refcounting vs generational GC (2)
-----------------------------------
+* for each possible branch, generate a guard, that exits assembler on triggering
-* ``__del__``
+* if guard fails often enough, start tracing from the failure
- - especially files or sockets
+Meta-Tracing in PyPy
+--------------------
- - don't leak file descriptors!
+* The explanation above assumes a tracing JIT for the full Python
+ language
-* weakrefs
+* Would need to be maintained whenever we change the Python version we
+ support
-* ``finally`` inside generators
+* Instead, we have a "meta-tracing JIT"
+* A very important point for us since we don't have a huge team
+ to implement all Python semantics for the JIT
-
-How the JIT works
------------------------
-
-XXX write me
+* We trace the python interpreter's main loop (running N times) interpreting
+ a python loop (running once)
PYPYLOG
More information about the pypy-commit
mailing list