CFFI's API Mode: Why a Compiler is Key for Performance

CFFI's 'API mode' generates a CPython C wrapper that directly invokes target functions, requiring a C compiler during a separate compilation step to create a C extension module. This mode is significantly faster and more robust than its 'ABI mode,' which accesses libraries at a binary level through the slower `libffi` library.

Sources

Open the full topic