[pypy-commit] extradoc extradoc: new slides

alex_gaynor noreply at buildbot.pypy.org
Sat Feb 25 17:49:14 CET 2012


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: extradoc
Changeset: r4106:6617ba2b6f20
Date: 2012-02-25 11:48 -0500
http://bitbucket.org/pypy/extradoc/changeset/6617ba2b6f20/

Log:	new slides

diff --git a/talk/pycon2012/tutorial/slides.rst b/talk/pycon2012/tutorial/slides.rst
--- a/talk/pycon2012/tutorial/slides.rst
+++ b/talk/pycon2012/tutorial/slides.rst
@@ -1,3 +1,44 @@
+First rule of optimization?
+===========================
+
+|pause|
+
+If it's not correct, it doesn't matter.
+
+Second rule of optimization?
+============================
+
+|pause|
+
+If it's not faster, you're wasting ime.
+
+Third rule of optimization?
+===========================
+
+|pause|
+
+Measure twice, cut once.
+
+(C)Python performance tricks
+============================
+
+|pause|
+
+* ``map()`` instead of list comprehensions
+
+* ``def f(int=int):``, make globals local
+
+* ``append = my_list.append``, grab bound methods outside loop
+
+* Avoiding function calls
+
+Forget these
+============
+
+* PyPy has totally different performance characterists
+
+* Which we're going to learn about now
+
 Why PyPy?
 =========
 
@@ -41,7 +82,7 @@
 
 * moving computations to C, example::
 
-   map(operator.... ) # XXX some obscure example
+   map(operator.attrgetter("a"), my_list)
 
 PyPy's sweetpot
 ===============


More information about the pypy-commit mailing list