3 ms·
also: why not use fil-c to improve cython, and the ffi.
by cypherpunk666 2mo ago
also: why not use fil-c to improve cython, and the ffi.
- FuckButtons 2mo agothe only reason to use cython (in my experience) is to write quick numpy extensions without a tonne of extra baggage from having a complete compiled extension in C/C++/Rust. Often, you explicitly want to avoid the compiler offering you any kinds of additional checking because you want to get maximum throughput. Most of the functions I’ve written in cython explicitly opt out of bounds checking etc since the memory access is sequential and bounded by construction and very obvious when you mess things up by writing simple unit tests. Given that, it doesn’t seem useful to me to add any kind of memory safety as additional overhead. YMMV I mostly do scientific computing and signal processing.
- josephg 2mo agoIf you want a slow, garbage collected language in the Python ecosystem, why not just write Python?
- cypherpunk666 2mo agoyou would. python and ffi would have runtime sanity checks a la fil-c. better error messages too. ask your favorite LLM how it would look.