Author: Maciej Fijalkowski <[email protected]>
Branch: extradoc
Changeset: r5412:9257532b4a94
Date: 2014-09-20 12:40 +0200
http://bitbucket.org/pypy/extradoc/changeset/9257532b4a94/
Log: talk as it went
diff --git a/talk/brno-php-2014/Makefile b/talk/brno-php-2014/Makefile
new file mode 100644
--- /dev/null
+++ b/talk/brno-php-2014/Makefile
@@ -0,0 +1,6 @@
+talk.pdf: talk.rst stylesheet.latex author.latex
+ rst2beamer --stylesheet=stylesheet.latex --documentoptions=14pt
talk.rst talk.latex --overlaybullets=false || exit
+ pdflatex talk.latex
+
+clean:
+ rm talk.pdf talk.latex
\ No newline at end of file
diff --git a/talk/brno-php-2014/stylesheet.latex
b/talk/brno-php-2014/stylesheet.latex
new file mode 100644
--- /dev/null
+++ b/talk/brno-php-2014/stylesheet.latex
@@ -0,0 +1,10 @@
+\usetheme{Warsaw}
+\setbeamercovered{transparent}
+\setbeamertemplate{navigation symbols}{}
+
+\definecolor{darkgreen}{rgb}{0, 0.5, 0.0}
+\newcommand{\docutilsrolegreen}[1]{\color{darkgreen}#1\normalcolor}
+\newcommand{\docutilsrolered}[1]{\color{red}#1\normalcolor}
+
+\newcommand{\green}[1]{\color{darkgreen}#1\normalcolor}
+\newcommand{\red}[1]{\color{red}#1\normalcolor}
diff --git a/talk/brno-php-2014/talk.pdf b/talk/brno-php-2014/talk.pdf
new file mode 100644
index
0000000000000000000000000000000000000000..a2346852cf47c78cad5350a6639917bec93bb0d3
GIT binary patch
[cut]
diff --git a/talk/brno-php-2014/talk.rst b/talk/brno-php-2014/talk.rst
--- a/talk/brno-php-2014/talk.rst
+++ b/talk/brno-php-2014/talk.rst
@@ -1,27 +1,27 @@
+.. include:: ../default/beamerdefs.txt
+
HippyVM - yet another attempt at PHP performance
-------------------------------------------------
+================================================
Who am I?
---------
* Maciej Fijalkowski
-* PyPy developer for about 8 years
+* PyPy core developer for about 8 years
-* main author of hippyvm
+* main author of HippyVM
* founder of baroquesoftware.com
This talk
---------
-* hippyvm project
+* HippyVM project
* performance and measurments
-* history
-
-* questions after each part
+* a bit about PyPy, HippyVM and performance oriented virtual machines
HippyVM
-------
@@ -30,7 +30,7 @@
|pause|
-* has a just in time compiler, which makes it fast
+* has a **just in time compiler**, which makes it fast
|pause|
@@ -39,7 +39,7 @@
HippyVM status
--------------
-* runs a lot of PHP test suite
+* runs a lot of PHP test suite (over half)
* misses a lot of builtin functions
@@ -47,7 +47,18 @@
* cgi, fastcgi (not open source)
-* fast
+* performance oriented
+
+HippyVM demo
+------------
+
+* famous fibonacci
+
+* fannkuch
+
+* richards
+
+* bigger stuff\*
HippyVM status - short
----------------------
@@ -61,11 +72,6 @@
* demo
-HippyVM - questions
--------------------
-
-* ?
-
Let's talk about performance
----------------------------
@@ -88,6 +94,10 @@
* non-trivial interactions between the pieces
+|pause|
+
+* I can't guess
+
Performance
-----------
@@ -106,6 +116,50 @@
* don't use a single number
+Bad benchmarking - example 1
+----------------------------
+
+* benchmarks game
+
+* limited set of benchmarks
+
+* limited set of bottlenecks
+
+* relentlessly optimized
+
+Bad benchmarking - example 2
+----------------------------
+
+* pystone
+
+* the idea - measure time consumed by each operation
+
+* should give you the idea how the program will operate
+
+|pause|
+
+* it's wrong
+
+Why it's wrong?
+---------------
+
+* the interaction is non-trivial
+
+* e.g. garbage collection
+
+* Python 2.6 vs 2.7, "minor" improvement in the GC
+
+* PyPy translation toolchain takes 1h instead of 3h
+
+Good benchmarking - example
+---------------------------
+
+* speed.pypy.org
+
+* a decent set of small medium and large benchmarks
+
+* I strongly encourage people to come up with the same for PHP
+
PHP performance
---------------
@@ -145,27 +199,34 @@
* consider bottlenecks differ depending on implementation
-Good benchmarking - example
----------------------------
+PHP performance problems
+------------------------
-* speed.pypy.org
+* low performance of the reference implementation
-* I strongly encourage people to come up with the same for PHP
+* relative immaturity of more advanced implementations
+
+* reload all the code creates problems
+
+|pause|
+
+* the language quirks can be worked around
+
+|pause|
+
+* in my opinion, dynamism, etc. does not matter
Performance - personal opinions
-------------------------------
* the language should be easy **for a programmer**
+* we, as a PyPy team, never discuss language design
+
* the language implementation can be complex
* libraries, patterns and the ecosystem matter for anything non-trivial
-Performance - questions
------------------------
-
-* ?
-
HippyVM history
---------------
@@ -199,12 +260,53 @@
* we decided to write a framework instead
-A typical example
------------------
+Just in time compiler?
+----------------------
-* interpreter, written in C++
+* "lower level" languages, like C, have compilers that turn C into assembler
-* just in time compiler that repeats the semantics, written in C++,
+* "higher level" have interpreters that run a virtual machine
+
+* just in time is a hybrid - run in an interpreter,
+ compile to assembler on the fly
+
+Why not a compiler?
+-------------------
+
+* "Just compile X to Lisp/C/JavaScript, it'll be fast!"
+
+|pause|
+
+* mismatch in semantics
+
+* hard-to-prove edge cases
+
+* ends up not being that fast
+
+Just in time - benefits
+-----------------------
+
+* you can choose what to compile
+
+* you can ignore the edge cases (but have a way to deoptimize)
+
+* guesses are a lot easier
+
+* a lot of things fall in naturally, e.g. late imports
+
+A simple example
+----------------
+
+* an interpreter written in C/C++
+
+* e.g. CPython, Zend PHP, MRI Ruby, ...
+
+A typical more advanced example
+-------------------------------
+
+* interpreter, written in C/C++
+
+* just in time compiler that repeats the semantics, written in C/C++,
emits assembler
* another layer, e.g. a method JIT
@@ -213,10 +315,12 @@
* becomes harder and harder to keep up with semantics
+* examples: V8, HHVM, \*monkey
+
PyPy approach
-------------
-* write an interpreter in machine-readable language
+* write an interpreter in a machine-readable language
* just in time compiler gets generated from the description
@@ -235,6 +339,15 @@
* Truffle is another example of a similar approach
+HippyVM - future
+----------------
+
+* find more funding
+
+* run open source projects efficiently
+
+* develop a benchmark suite
+
Questions?
----------
diff --git a/talk/default/beamerdefs.txt b/talk/default/beamerdefs.txt
new file mode 100644
--- /dev/null
+++ b/talk/default/beamerdefs.txt
@@ -0,0 +1,108 @@
+.. colors
+.. ===========================
+
+.. role:: green
+.. role:: red
+
+
+.. general useful commands
+.. ===========================
+
+.. |pause| raw:: latex
+
+ \pause
+
+.. |small| raw:: latex
+
+ {\small
+
+.. |end_small| raw:: latex
+
+ }
+
+.. |scriptsize| raw:: latex
+
+ {\scriptsize
+
+.. |end_scriptsize| raw:: latex
+
+ }
+
+.. |strike<| raw:: latex
+
+ \sout{
+
+.. closed bracket
+.. ===========================
+
+.. |>| raw:: latex
+
+ }
+
+
+.. example block
+.. ===========================
+
+.. |example<| raw:: latex
+
+ \begin{exampleblock}{
+
+
+.. |end_example| raw:: latex
+
+ \end{exampleblock}
+
+
+
+.. alert block
+.. ===========================
+
+.. |alert<| raw:: latex
+
+ \begin{alertblock}{
+
+
+.. |end_alert| raw:: latex
+
+ \end{alertblock}
+
+
+
+.. columns
+.. ===========================
+
+.. |column1| raw:: latex
+
+ \begin{columns}
+ \begin{column}{0.45\textwidth}
+
+.. |column2| raw:: latex
+
+ \end{column}
+ \begin{column}{0.45\textwidth}
+
+
+.. |end_columns| raw:: latex
+
+ \end{column}
+ \end{columns}
+
+
+
+.. |snake| image:: ../../img/py-web-new.png
+ :scale: 15%
+
+
+
+.. nested blocks
+.. ===========================
+
+.. |nested| raw:: latex
+
+ \begin{columns}
+ \begin{column}{0.85\textwidth}
+
+.. |end_nested| raw:: latex
+
+ \end{column}
+ \end{columns}
diff --git a/talk/ep2014/status/stylesheet.latex
b/talk/ep2014/status/stylesheet.latex
--- a/talk/ep2014/status/stylesheet.latex
+++ b/talk/ep2014/status/stylesheet.latex
@@ -1,4 +1,3 @@
-\usetheme{Boadilla}
\setbeamercovered{transparent}
\setbeamertemplate{navigation symbols}{}
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit