4 ms·
As contrast, calling C from Python, even using callbacks, it is very easy and incredibly useful, thanks to the "ctypes" [1] [1] https://docs.python.org/2/libra
by faragon 8y ago
As contrast, calling C from Python, even using callbacks, it is very easy and incredibly useful, thanks to the "ctypes" [1]
[1] https://docs.python.org/2/library/ctypes.html https://docs.python.org/2/library/ctypes.html
- simias 8y agoTrue but that's not particularly impressive, most non-sandboxed scripting languages have a straightforward way to call C. It's just a lot simpler that way: C doesn't have much of a runtime, you don't have to worry about corrupting C's state too much. There's no garbage collector in C for instance.
- mattip 8y agoBetter to use cffi instead, it will be much more performant on PyPy