[Python-ideas] discouraging direct use of the C-API

Paul Moore p.f.moore at gmail.com
Thu May 7 13:50:09 CEST 2015


On 7 May 2015 at 10:11, Stefan Krah <stefan at bytereef.org> wrote:
> Caleb Hattingh <caleb.hattingh at ...> writes:
>> > -1. CFFI is much slower than using the C-API directly.
>>
>> I am quite interested in this; do you happen have a link to a case
> study/gist/repo where this has been
>> measured? Even if you can remember people’s names involved or something
> similar, I could google it myself.
>
> I've measured it here:
>
> https://mail.python.org/pipermail/python-dev/2013-December/130772.html
>
>
> CFFI is very nice (superb API), but not for high performance use cases.

I'm guessing that benchmark used cffi in the "ABI level" dynamic form
that matches ctypes. Did you try the cffi "API level" form that
creates a C extension? I'd be curious as to where that falls in
performance.

Paul


More information about the Python-ideas mailing list