Author: Armin Rigo <ar...@tunes.org>
Branch: extradoc
Changeset: r5833:b1be3972614e
Date: 2017-10-05 07:55 +0200
http://bitbucket.org/pypy/extradoc/changeset/b1be3972614e/

Log:    PyConZA 2017 talk, mostly copied from ep2017

diff --git a/talk/pyconza2017/pypy-whats-new/Makefile 
b/talk/pyconza2017/pypy-whats-new/Makefile
new file mode 100644
--- /dev/null
+++ b/talk/pyconza2017/pypy-whats-new/Makefile
@@ -0,0 +1,7 @@
+slides.pdf: slides.tex author.latex
+       pdflatex -halt-on-error $<
+
+slides.tex: slides.rst
+       rst2beamer.py slides.rst > slides.tex
+       sed 's/\\date{}/\\input{author.latex}/' -i slides.tex || exit
+       sed 
's/\\documentclass\[\]{beamer}/\\documentclass\[aspectratio=169\]{beamer}/' -i 
slides.tex || exit
diff --git a/talk/pyconza2017/pypy-whats-new/author.latex 
b/talk/pyconza2017/pypy-whats-new/author.latex
new file mode 100644
--- /dev/null
+++ b/talk/pyconza2017/pypy-whats-new/author.latex
@@ -0,0 +1,7 @@
+\definecolor{rrblitbackground}{rgb}{0.4, 0.0, 0.0}
+
+\title[What's New in PyPy]{PyPy meets Python 3 and Numpy (and other What's New 
topics)}
+\author[Armin Rigo]{Armin Rigo}
+
+\institute{PyConZA 2017}
+\date{October 2017}
diff --git a/talk/pyconza2017/pypy-whats-new/graphs.png 
b/talk/pyconza2017/pypy-whats-new/graphs.png
new file mode 100644
index 
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..9e5b0156179767c78b72f414147959bec8e982c0
GIT binary patch

[cut]

diff --git a/talk/pyconza2017/pypy-whats-new/slides.pdf 
b/talk/pyconza2017/pypy-whats-new/slides.pdf
new file mode 100644
index 
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7fd5fdeae3fe34927641ade3c151867aa43c75f7
GIT binary patch

[cut]

diff --git a/talk/pyconza2017/pypy-whats-new/slides.rst 
b/talk/pyconza2017/pypy-whats-new/slides.rst
new file mode 100644
--- /dev/null
+++ b/talk/pyconza2017/pypy-whats-new/slides.rst
@@ -0,0 +1,280 @@
+===========================================================
+PyPy meets Python 3 and Numpy (and other What's New topics)
+===========================================================
+
+
+What's New In PyPy
+==================
+
+1. Python 3.5
+
+2. Numpy, Cython, Pandas, ...
+
+3. pypy-stm?
+
+4. RevDB: reverse debugging
+
+5. Others...
+
+
+What is PyPy
+============
+
+* PyPy is another implementation of Python
+
+* Mostly, drop-in replacement
+
+* Supports Python 2.7, and almost Python 3.5
+
+* Comes with a JIT, good performance
+
+
+PyPy 3.5
+============================================================
+
+PyPy 3.5
+==========
+
+* Python 3.5 support released in *gamma*
+
+  - as stable (and mostly as fast) as PyPy 2.7, same JIT/GC/etc.
+
+  - what could be wrong is a few details everywhere
+
+  - please try it and *report issues!*
+
+* Thanks to Mozilla for funding this work!
+
+
+PyPy 3.5
+==========
+
+* Async HTTP benchmarks:
+
+.. image:: graphs.png
+   :scale: 26%
+
+
+PyPy 3.5 status
+===============
+
+* Roughly complete 3.5 support (plus f-strings!)
+
+* Reasonably good performance
+
+* Tested mostly on Linux so far
+
+* First "final" to be released very soon
+
+* Python 3.6 to follow
+
+
+Scientific stack
+============================================================
+
+Scientific stack
+================
+
+Numpy or Numpypy?
+
+* Numpy = the standard numpy library
+
+* Numpypy = our own partial reimplementation
+
+
+Scientific stack
+================
+
+Numpy or Numpypy?
+
+* Numpy = the standard numpy library  *(use this)*
+
+* Numpypy = our own partial reimplementation  *(deprecated)*
+
+
+Scientific stack
+================
+
+* Numpy works (99.9%)
+
+* On both PyPy 2.7 and PyPy 3.5
+
+* The rest of the scientific stack mostly works too (Jupyter,
+  Matplotlib, Pandas, etc.)
+
+
+Cython, cpyext
+================
+
+* Cython mostly works
+
+* Actually, any CPython C extension module mostly works
+
+* Thanks to ``cpyext``, our CPython C API emulation layer
+
+
+Performance?
+==============
+
+* Numpy/Pandas/etc. are all slow-ish at the Python-C boundary
+
+* Less so than last year but still
+
+* Complex algorithms written inside Numpy in C or Fortran have the same
+  speed, of course
+
+  - lots of ``ndarray[index]`` => slow
+
+  - one call to ``numpy.linalg.eig()`` => fast
+
+  - speed hack: ``p = ffi.cast("double *", ffi.from_buffer(ndarray))``
+
+
+Performance?
+==============
+
+* We have plans to improve
+
+* Funding help welcome
+
+* For now: try it out on your own code and see
+
+
+
+
+Software Transactional Memory
+============================================================
+
+Software Transactional Memory
+=============================
+
+* ``pypy-stm``: getting rid of the Global Interpreter Lock
+
+
+Software Transactional Memory
+=============================
+
+* ...unfortunately, this approach does not seem to work :-(
+
+
+Software Transactional Memory
+=============================
+
+Unstable performance:
+
+* "Conflicts" between threads are hard to find
+
+* Fix one conflict, usually only to uncover the next one
+
+* As long as there is one, performance is bad
+
+* You may fix enough to get good performance... but:
+
+* Continue developing the program, and you'll often reintroduce conflicts
+
+* (Also, hard to test for, reliably)
+
+
+PyPy-nogil?
+===========
+
+* Another possibility: a GIL-free but non-STM PyPy
+
+* Large amount of work, not looking forward to do it
+
+* Would require serious funding first
+
+
+
+Reverse Debugger
+============================================================
+
+Reverse Debugger
+================
+
+* RevDB: The essential tool you need once a year
+
+
+Reverse Debugger
+================
+
+* Debugger with the ability to go forward *and backward in time*
+
+* Watchpoints to know when a value changes, while going in either
+  direction
+
+* http://bitbucket.org/pypy/revdb
+
+
+
+Others
+============================================================
+
+JIT improvements
+======================
+
+* Reductions in the warm-up time
+
+* Consumes less memory, too
+
+
+VMProf
+=====================
+
+* A good high-performance profiler for Python code
+
+* ``pip install vmprof``
+
+* Works on CPython and on PyPy
+
+* The PyPy version shows the machine code generated by the JIT
+
+
+CFFI improvements
+=======================
+
+* CFFI: calling C from Python or the other way around
+
+* Works identically on CPython and on PyPy
+
+* Biggest improvement of last year is *embedding*
+
+* Use CFFI to embed Python inside another program---much easier than
+  with the CPython C API, and works identically on CPython or PyPy too
+
+
+Next year?
+=================================================================
+
+Next year?
+==========
+
+* Polish PyPy 3.5 / 3.6
+
+* Polish Numpy and the scientific stack
+
+* Port RevDB to PyPy 3.5
+
+* Better memory profiling
+
+.. raw:: latex
+
+    \vskip 5mm
+    \vphantom{Thank you!}
+
+
+Question & answers
+==================
+
+* Polish PyPy 3.5 / 3.6
+
+* Polish Numpy and the scientific stack
+
+* Port RevDB to PyPy 3.5
+
+* Better memory profiling
+
+.. raw:: latex
+
+    \vskip 5mm
+    Thank you!  \hskip 35mm  \texttt{http://pypy.org/}
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to