[pypy-svn] r71208 - pypy/extradoc/talk/pycon2010/pypyspeed

fijal at codespeak.net fijal at codespeak.net
Fri Feb 12 17:22:23 CET 2010


Author: fijal
Date: Fri Feb 12 17:22:21 2010
New Revision: 71208

Modified:
   pypy/extradoc/talk/pycon2010/pypyspeed/talk.txt
Log:
more slides


Modified: pypy/extradoc/talk/pycon2010/pypyspeed/talk.txt
==============================================================================
--- pypy/extradoc/talk/pycon2010/pypyspeed/talk.txt	(original)
+++ pypy/extradoc/talk/pycon2010/pypyspeed/talk.txt	Fri Feb 12 17:22:21 2010
@@ -74,42 +74,65 @@
 Shared dicts (aka hidden classes)
 =================================
 
-xxx
+* instance *__dict__* access becomes a list
+  lookup
+
+* however, if you do evil hacks,
+  it'll bail down back
 
 ... only for newstyle classes
 =============================
 
-xxx
+* there are few minor, but annoying, differencies
+
+* while it can be done, we ask you to not use
+  old style classes instead :-)
 
 Generators are tricky (for now)
 ===============================
 
-xxxx
+* they can't be as fast, because generator
+  frame needs to be allocated
+
+* they still can be sped up by a bit and
+  that's a current limitation
 
 Generator expressions are even trickier
 =======================================
 
-xxx
+* for now, if possible, use list comprehension
 
 Don't try to outsmart your compiler
 ===================================
 
-xxx
+* simple loop is better than a complex
+  map/lambda/reduce combination
 
-Solution: move back code to python
-==================================
+* even if on CPython the latter is faster
 
-xxx
+* general rule: if it's easier to read, it's easier
+  to read by the JIT
 
-Never use id(obj), unless you really have to
-============================================
+Solution: move back code to python
+==================================
 
-xxx
+XXX remove this slide
 
 Allocation patterns
 ===================
 
-xxx
+* PyPy uses a moving GC (like JVM, .NET, etc.)
+
+* pretty efficient for usecases with a lot of
+  short-living objects
+
+* objects are smaller than on CPython
+
+Never use id(obj), unless you really have to
+============================================
+
+* contrary to popular belief, *id* semantics make
+  that a complex operation on a moving GC
 
 Bad case for a moving GC
 ========================
@@ -133,4 +156,7 @@
 Q&A
 ===
 
-* xxx
+* http://morepypy.blogspot.com
+
+* http://merlinux.eu
+



More information about the Pypy-commit mailing list