pymad / cpymad

cPyMAD is a python interface to Mad-X using cython and libmadx
http://cern.ch/pymad
Apache License 2.0
3 stars 3 forks source link

Replace Cython by CFFI (?) #61

Closed coldfix closed 10 years ago

coldfix commented 10 years ago

This is just a suggestion to think about.

C Foreign Function Interface (CFFI) provides an alternative way to access C libraries from Python. Compared to Cython, its advantage is that it allows deploying to target systems where there is no C compiler available (or so it says). Especially on windows, this might be a big advantage (I haven't figured out the whole deployment issue for windows yet).

Furthermore, it will allow to just copy the declarations from the C headers, instead of rewriting them into another language (Cython).

On the other hand, it is probably much slower than Cython. It says, it is comparable to ctypes.

I might try it out on a small scale some day to see if behaves nicely.

coldfix commented 10 years ago

More bindings to consider:

I will close this for now, as the Cython binding works fine for the moment and on windows, wheels (.whl) can be used to install to systems without C compiler, assuming there is a pre-built version for the correct platform.