<div dir="ltr">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". =)</div>

<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 17, 2013 at 11:43 AM, Stefan Krah <span dir="ltr"><<a href="mailto:stefan@bytereef.org" target="_blank">stefan@bytereef.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Maciej Fijalkowski <<a href="mailto:fijall@gmail.com">fijall@gmail.com</a>> wrote:<br>
> I would like to discuss on the language summit a potential inclusion<br>
> of cffi[1] into stdlib. This is a project Armin Rigo has been working<br>
> for a while, with some input from other developers.<br>
<br>
</div>I've tried cffi (admittedly only in a toy script) and find it very nice<br>
to use.<br>
<br>
Here's a comparison (pi benchmark) between wrapping libmpdec using a<br>
C-extension (_decimal), cffi and ctypes:<br>
<br>
<br>
+-------------------------------+----------+----------+---------+<br>
|                               | _decimal |  ctypes  |   cffi  |<br>
+===============================+==========+==========+=========+<br>
| cpython-tip (with-system-ffi) |   0.19s  |   5.40s  |  5.14s  |<br>
+-------------------------------+----------+----------+---------+<br>
| cpython-2.7 (with-system-ffi) |    n/a   |   4.46s  |  5.18s  |<br>
+-------------------------------+----------+----------+---------+<br>
|      Ubuntu-cpython-2.7       |    n/a   |   3.63s  |    -    |<br>
+-------------------------------+----------+----------+---------+<br>
|      pypy-2.2.1-linux64       |    n/a   |  125.9s  |  0.94s  |<br>
+-------------------------------+----------+----------+---------+<br>
|     pypy3-2.1-beta1-linux64   |    n/a   |  264.9s  |  2.93s  |<br>
+-------------------------------+----------+----------+---------+<br>
<br>
<br>
I guess the key points are that C-extensions are hard to beat and that<br>
cffi performance on pypy-2 is outstanding. Additionally it's worth noting<br>
that Ubuntu does something in their Python build that we should do, too.<br>
<br>
<br>
+1 for cffi in the stdlib.<br>
<br>
<br>
<br>
Stefan Krah<br>
<div class="im"><br>
<br>
<br>
_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
</div><a href="https://mail.python.org/mailman/listinfo/python-dev" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/brett%40python.org" target="_blank">https://mail.python.org/mailman/options/python-dev/brett%40python.org</a><br>
</blockquote></div><br></div>