logoalt Hacker News

cypherpunk666yesterday at 6:49 PM2 repliesview on HN

also: why not use fil-c to improve cython, and the ffi.


Replies

josephgyesterday at 10:57 PM

If you want a slow, garbage collected language in the Python ecosystem, why not just write Python?

FuckButtonsyesterday at 8:19 PM

the 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.