[pypy-commit] extradoc extradoc: My talk, mostly copied from googlezurich2012.

arigo noreply at buildbot.pypy.org
Sat Oct 6 14:31:48 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: extradoc
Changeset: r4837:383391c34716
Date: 2012-10-06 14:31 +0200
http://bitbucket.org/pypy/extradoc/changeset/383391c34716/

Log:	My talk, mostly copied from googlezurich2012.

diff --git a/talk/googlezurich2012/Makefile b/talk/pyconza2012/stm-talk/Makefile
copy from talk/googlezurich2012/Makefile
copy to talk/pyconza2012/stm-talk/Makefile
diff --git a/talk/pyconza2012/stm-talk/author.latex b/talk/pyconza2012/stm-talk/author.latex
new file mode 100644
--- /dev/null
+++ b/talk/pyconza2012/stm-talk/author.latex
@@ -0,0 +1,8 @@
+\definecolor{rrblitbackground}{rgb}{0.0, 0.0, 0.0}
+
+\title[PyPy in Production]{PyPy}
+\author[Armin Rigo]
+{Armin Rigo}
+
+\institute{PyCon ZA 2012}
+\date{October 4, 2012}
diff --git a/talk/googlezurich2012/beamerdefs.txt b/talk/pyconza2012/stm-talk/beamerdefs.txt
copy from talk/googlezurich2012/beamerdefs.txt
copy to talk/pyconza2012/stm-talk/beamerdefs.txt
--- a/talk/googlezurich2012/beamerdefs.txt
+++ b/talk/pyconza2012/stm-talk/beamerdefs.txt
@@ -89,7 +89,7 @@
 
 
 
-.. |snake| image:: ../img/py-web-new.png
+.. |snake| image:: ../../img/py-web-new.png
            :scale: 15%
            
 
diff --git a/talk/pyconza2012/stm-talk/demo1.py b/talk/pyconza2012/stm-talk/demo1.py
new file mode 100644
--- /dev/null
+++ b/talk/pyconza2012/stm-talk/demo1.py
@@ -0,0 +1,19 @@
+
+class Number(object):
+
+   def __init__(self, num):
+       self.num = num
+
+   def __add__(self, other):
+       return Number(self.num + other.num)
+
+   def __invert__(self):
+       return Number(~self.num)
+
+def foo(n):
+    total = Number(0)
+    for i in range(n):
+        total += Number(i)
+        total += ~ Number(i)
+    return total.num
+
diff --git a/talk/googlezurich2012/standards.png b/talk/pyconza2012/stm-talk/standards.png
copy from talk/googlezurich2012/standards.png
copy to talk/pyconza2012/stm-talk/standards.png
diff --git a/talk/googlezurich2012/stylesheet.latex b/talk/pyconza2012/stm-talk/stylesheet.latex
copy from talk/googlezurich2012/stylesheet.latex
copy to talk/pyconza2012/stm-talk/stylesheet.latex
diff --git a/talk/pyconza2012/stm-talk/talk.rst b/talk/pyconza2012/stm-talk/talk.rst
new file mode 100644
--- /dev/null
+++ b/talk/pyconza2012/stm-talk/talk.rst
@@ -0,0 +1,205 @@
+.. include:: beamerdefs.txt
+
+============================================================
+PyPy
+============================================================
+
+
+PyPy is...
+--------------------------
+
+* Another Python interpreter
+
+* with a JIT compiler
+
+
+PyPy was...
+-------------------
+
+* Around since 2003
+
+* (advertised as) production ready since December 2010
+
+  - release 1.4
+
+* Funding
+
+  - EU FP6 programme
+
+  - Eurostars programme
+
+  - donations
+
+  - ...
+
+
+PyPy 1.9: current status
+------------------------
+
+* Faster
+
+  - **1.7x** than 1.5 (Summer 2011)
+
+  - **2.2x** than 1.4 (December 2010)
+
+  - **5.5x** than CPython
+
+* Implements Python 2.7.3
+
+* Many more "PyPy-friendly" programs than before
+
+* Packaging
+
+  - |scriptsize| Debian, Ubuntu, Fedora, Homebrew, Gentoo, ArchLinux, ... |end_scriptsize|
+
+  - |scriptsize| Windows (32bit only), OS X |end_scriptsize|
+
+* C extension compatibility
+
+  - runs (big part of) **PyOpenSSL** and **lxml**
+
+
+PyPy organization
+-----------------
+
+* Part of SFC -- Software Freedom Conservancy
+
+  - Bradley successfully fighting U.S. bureaucracy
+
+  - we are happy about it
+
+
+* Funding model
+
+  - py3k, numpy, STM
+
+  - more than 100'000$ in donations
+
+  - from individuals, large companies and the PSF
+
+
+PyPy's JIT compiler
+-------------------
+
+* Removes abstraction
+
+* Almost never gives up
+
+* x86-32, x86-64, ARMv7, (POWER64)
+
+* (Works with other languages)
+
+
+Real world applications
+-----------------------
+
+* Positive feedback
+
+* http://speed.pypy.org/
+
+
+
+py3k
+------------------------
+
+* ``py3k`` branch in mercurial
+
+  - developed in parallel
+
+  - Python 3 written in Python 2
+
+* Focus on correctness
+
+* Dropped some interpreter optimizations for now
+
+* First 90% done, remaining 90% not done
+
+* Majority of the funds by Google
+
+
+NumPy
+-----
+
+* progress going slowly
+
+* multi dimensional arrays, broadcasting, fancy indexing
+
+* all dtypes, except complex, strings and objects
+
+* good results for performance
+
+
+STM
+---------------------------
+
+* Software Transactional Memory
+
+* "Remove the GIL"
+
+* But also, new models (better than threads)
+
+
+
+Calling C
+---------
+
+.. image:: standards.png
+   :scale: 60%
+   :align: center
+
+Calling C landscape
+-------------------
+
+* CPython C extensions
+
+* SWIG, SIP, wrapper generators
+
+* ctypes
+
+* Cython
+
+* CFFI (our new thing)
+
+CFFI
+----------
+
+|scriptsize|
+|example<| Example |>|
+
+  .. sourcecode:: pycon
+
+   >>> from cffi import FFI
+   >>> ffi = FFI()
+   >>> ffi.cdef("""
+   ...     int printf(const char *format, ...);
+   ... """)
+   >>> C = ffi.dlopen(None)
+   >>> arg = ffi.new("char[]", "world")
+   >>> C.printf("hi there, %s!\n", arg)
+   hi there, world!
+
+|end_example|
+|end_scriptsize|
+
+CFFI
+----
+
+* Many more examples
+
+* Including macro calls and most subtleties of C
+
+* http://cffi.readthedocs.org
+
+
+STM
+---
+
+
+Conclusion
+----------
+
+* Try out PyPy on real code
+
+* http://pypy.org/
+
+* Thank you!
diff --git a/talk/googlezurich2012/title.latex b/talk/pyconza2012/stm-talk/title.latex
copy from talk/googlezurich2012/title.latex
copy to talk/pyconza2012/stm-talk/title.latex
--- a/talk/googlezurich2012/title.latex
+++ b/talk/pyconza2012/stm-talk/title.latex
@@ -1,5 +1,5 @@
 \begin{titlepage}
 \begin{figure}[h]
-\includegraphics[width=60px]{../img/py-web-new.png}
+\includegraphics[width=60px]{../../img/py-web-new.png}
 \end{figure}
 \end{titlepage}


More information about the pypy-commit mailing list