Python Previous Work

There a several available tools to creating a Python interface to a C or C++ library.

Ctypes

Pros

  • No need for compiler.

Cons

  • Difficult wrapping C++ due to mangling and object ABI.

Cython

http://blog.kevmod.com/2020/05/python-performance-its-not-just-the-interpreter/

I ran Cython (a Python->C converter) on the previous benchmark, and it runs in exactly the same amount of time: 2.11s. I wrote a simplified C extension in 36 lines compared to Cython’s 3600, and it too runs in 2.11s.

SIP

Sip was developed to create PyQt.