Hi Wim, On 21 July 2017 at 09:46, <wlavrij...@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. _______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev