[pypy-svn] r76277 - pypy/extradoc/talk/ep2010/talk

afa at codespeak.net afa at codespeak.net
Mon Jul 19 01:10:33 CEST 2010


Author: afa
Date: Mon Jul 19 01:10:31 2010
New Revision: 76277

Modified:
   pypy/extradoc/talk/ep2010/talk/talk.rst
Log:
Save intermediate version, needs a lot of formatting


Modified: pypy/extradoc/talk/ep2010/talk/talk.rst
==============================================================================
--- pypy/extradoc/talk/ep2010/talk/talk.rst	(original)
+++ pypy/extradoc/talk/ep2010/talk/talk.rst	Mon Jul 19 01:10:31 2010
@@ -470,15 +470,58 @@
 
 - ``pypy-c setup.py build``
 
+- included in PyPy 1.3
+
 - still beta
 
-- not 100% of CPython API is supported
+- 50% of the CPython API is supported
+
+  * enough for 90% of extension modules
+
+features
+--------
+
+- C API written in Python!
+
+- Testable on top of an interpreted py.py
+
+- Source compatibility
+
+  * PyString_AS_STRING is actually a function call
+
+implementation
+--------------
+
+- Was not supposed to work
+
+  * different garbage collector
+
+  * no "borrowed reference"
+
+  * all the PyTypeObject slots
+
+- Written on top of the object space::
+
+    @cpython_api([PyObject], Py_ssize_t, error=-1)
+    def PyDict_Size(space, w_obj):
+        return space.int_w(space.len(w_obj))
+
+- *not* faster than python code!
+
+The Reference Counting Issue
+----------------------------
+
+- pypy uses a moving garbage collector
+
+- 
 
-- not included in PyPy 1.2
 
-- Known to work:
+suppported modules
+------------------
 
-  * wxPython (after a patch)
+- Known to work (after small patches):
+
+  * wxPython
 
   * _sre
 
@@ -486,6 +529,8 @@
 
   * PIL
 
+  * cx_Oracle
+
 
 wxPython on PyPy (1)
 ---------------------
@@ -496,13 +541,56 @@
 wxPython on PyPy (2)
 ---------------------
 
-
 .. image:: wxpython2.png
    :scale: 30
 
+performance
+-----------
+
+Test script::
+
+    from cx_Oracle import connect
+    c = connect('scott/tiger at db')
+    cur = c.cursor()
+    var = cur.var(STRING)
+
+    def f():
+        for i in range(10000):
+            var.setvalue(0, str(i))
+            var.getvalue(0)
+
+Time it::
+
+    python -m timeit -s "from test_oracle import f" "f()"
+    cpython2.6:   8.25 msec per loop
+    pypy-c:     161    msec per loop
+    pypy-c-jit: 121    msec per loop
+
+Compare with::
 
+    def f():
+        for i in range(10000):
+            x = str(i)
+            y = int(x)
+    cpython2.6:   8.18 msec per loop
+    pypy-c-jit:   1.22 msec per loop
 
 
+Future developments
+-------------------
+
+- Some care about speed
+
+- Fill missing API functions
+
+- Better suppport of the PyTypeObject slots
+
+  * don't try to call the base class' slot!
+
+- Think about threads and the GIL
+
+- Think about reference cycles
+
 
 Contact / Q&A 
 --------------
@@ -511,6 +599,10 @@
 
 * Armin Rigo: arigo (at) tunes.org
 
+* Amaury Forgeot d'Arc: amauryfa (at) gmail
+
+* And the #pypy channel!
+
 * Links:
 
   - PyPy: http://pypy.org/



More information about the Pypy-commit mailing list