Hi again,

On Wed, 26 Sep 2018 at 21:19, Dimitri Vorona via pypy-dev
<pypy-dev@python.org> wrote:
> In my microbenchmarks its has pretty much the same call performance as when 
> using cffi ABI mode (dumping the functions to a shared library first) and is 
> around 250ns per call slower than when using API mode.
>
> I haven't looked at the generating assembly yet, but I guess pypy has to be 
> more careful, since not all information from API mode is available.

Just for completeness, the documentation of CFFI says indeed that the
API mode is faster than the ABI mode.  That's true mostly on CPython,
where the ABI mode always requires using libffi for the calls, which
is slow.  On PyPy, the JIT has got enough information to do mostly the
same thing in the end.  (And before the JIT, PyPy uses libffi both for
the ABI and the API mode for simplicity.)


A bientôt,

Armin.
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to