[pypy-dev] okay to rename cppyy -> _cppyy

Armin Rigo armin.rigo at gmail.com
Fri Jul 21 11:03:58 EDT 2017


Hi Wim,

On 21 July 2017 at 09:46,  <wlavrijsen at lbl.gov> wrote:
> had a hard time getting these things fast in RPython, and PyPy may have an
> easier time with proper Python code (another reason to reject C++ wrappers
> and live with mangled names).

Comparing ABI mode (ffi.dlopen) and API mode (ffi.set_source) for
performance, people often fail to realize that the API mode is
generally much faster because calls don't go through libffi.  That is
always the case on CPython.

On PyPy, the JIT can compile all calls in API mode, but only "simple
enough" calls in ABI mode, making performance more predictable.  For
the cases where the call is "simple enough", you might think that the
API mode adds the marginal cost of a wrapper, but that is mostly wrong
too: the JIT replaces a call to a JMP instruction with a call to the
jmp target.


A bientôt,

Armin.


More information about the pypy-dev mailing list