[pypy-commit] cffi default: Another note about performance
arigo
pypy.commits at gmail.com
Sat Aug 12 09:23:01 EDT 2017
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r3001:281124d85f28
Date: 2017-08-12 15:22 +0200
http://bitbucket.org/cffi/cffi/changeset/281124d85f28/
Log: Another note about performance
diff --git a/doc/source/cdef.rst b/doc/source/cdef.rst
--- a/doc/source/cdef.rst
+++ b/doc/source/cdef.rst
@@ -314,7 +314,9 @@
Let me state it again: this gives ABI-level access to the library, so
you need to have all types declared manually exactly as they were
while the library was made. No checking is done. Mismatches can
-cause random crashes.
+cause random crashes. API-level access, on the other hand, is safer.
+Speed-wise, API-level access is much faster (it is common to have
+the opposite misconception about performance).
Note that only functions and global variables live in library objects;
the types exist in the ``ffi`` instance independently of library objects.
More information about the pypy-commit
mailing list