4 ms·
Aren't the fast parts of numpy written in C?
by gilbetron 4y ago
Aren't the fast parts of numpy written in C?
- gpm 4y agoAnd fortran. Which really doesn't matter that much as long as that doesn't leak to the users of numpy, and it doesn't really. The only issue is that it means if you're doing something that doesn't fit the APIs exposed by the native code (in a way where the hot loops are in native code) it's roughly as slow as normal python.
- gilbetron 4y agoBut it does for the argument of a language being fast, which is what we are talking about here. I don't think it is an appropriate argument to say "Python is fast, look at numpy", when the core pieces are written in C/Fortran. It is disingenuous, at least to me.