
On 18 Dec 2013 06:21, "Maciej Fijalkowski" <fijall@gmail.com> wrote:
On Tue, Dec 17, 2013 at 7:21 PM, Brett Cannon <brett@python.org> wrote:
Maybe someone from PyPy should bring this up as an official topic at the language summit to figure out the blockers (again). Or it can join
regex on
the list of "module discussed for addition at the language summit but never quite pushed to commitment". =)
we're still working on resolving discussed issues before officially proposing it for inclusion.
Note that there's also now a link chain from the CPython extension creation docs to cffi (and Cython) - the cross version Python Packaging User Guide now has a section on binary extensions that covers several of the alternatives to writing them by hand, while the stdlib extension writing guide has a note at the beginning pointing to that resource. Cheers, Nick.
On Tue, Dec 17, 2013 at 11:43 AM, Stefan Krah <stefan@bytereef.org>
wrote:
Maciej Fijalkowski <fijall@gmail.com> wrote:
I would like to discuss on the language summit a potential inclusion of cffi[1] into stdlib. This is a project Armin Rigo has been working for a while, with some input from other developers.
I've tried cffi (admittedly only in a toy script) and find it very nice to use.
Here's a comparison (pi benchmark) between wrapping libmpdec using a C-extension (_decimal), cffi and ctypes:
+-------------------------------+----------+----------+---------+ | | _decimal | ctypes | cffi | +===============================+==========+==========+=========+ | cpython-tip (with-system-ffi) | 0.19s | 5.40s | 5.14s | +-------------------------------+----------+----------+---------+ | cpython-2.7 (with-system-ffi) | n/a | 4.46s | 5.18s | +-------------------------------+----------+----------+---------+ | Ubuntu-cpython-2.7 | n/a | 3.63s | - | +-------------------------------+----------+----------+---------+ | pypy-2.2.1-linux64 | n/a | 125.9s | 0.94s | +-------------------------------+----------+----------+---------+ | pypy3-2.1-beta1-linux64 | n/a | 264.9s | 2.93s | +-------------------------------+----------+----------+---------+
I guess the key points are that C-extensions are hard to beat and that cffi performance on pypy-2 is outstanding. Additionally it's worth
noting
that Ubuntu does something in their Python build that we should do, too.
+1 for cffi in the stdlib.
Stefan Krah
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/brett%40python.org
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/fijall%40gmail.com
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com