Hi,
I'm running this hello world:
#!/usr/bin/env python
import cffi
ffi = cffi.FFI()
ffi.cdef(r"""
void hello();
""")
C = ffi.verify(r"""
#include <stdio.h>
void hello(void) {
printf("Hello world!\n");
}
""")
if __name__ == '__main__':
C.hello()
On Ubuntu 14.04, Python 2.7.6, pycparser 2.10, CFFI 0.8.2,
it takes 200ms for the first run and 45ms for the subsequent ones,
and it creates .__pycache__ under $HOME/.
On my office environment, RedHat 5, Python 2.6.2 installed in a custom location, pycparser 2.10 and CFFI 0.8.6 (both built from sources and installed in a custom location),
it takes 2s on the first run and 1.5s for the subsequent ones thereafter,
and it creates .__pycache__, yacctab.py and lextab.py in the current directory.
This is how I build them:
tar -xzf pycparser-release_v2.10.tar.gz
cd pycparser-release_v2.10
python setup.py --prefix=/my/custom/root
cd ..
tar -xzf cffi-0.8.6.tar.gz
cd cffi-0.8.6
python setup.py --prefix=/my/custom/root
cd ..
Thanks in advance