News for hackers. Stuff that matters.
Re:Comparing the C FFI overhead in various programming langu... by _pgmf on Saturday May 26, 2018 @09:57PM (#17165103)
ctypes is pretty slow in my experience. Cython is a nice alternative. Native speed and datatypes where you need them, plain old python anywhere else.
Re:Comparing the C FFI overhead in various programming langu... by eesmith on Sunday May 27, 2018 @12:40AM (#17165459)
Yes, my experience with CPython is that ctypes is slower than writing (or generating, as is the case with Cython) the Python/C extension.

However, one advantage with ctypes is that it can work with other Python implementations, like PyPy.