3 ms·
> People use numpy because python is stupidly slow. People use Python because numpy isn't slow! It works quite well for its domain.
by vmchale 3y ago
> People use numpy because python is stupidly slow.
People use Python because numpy isn't slow! It works quite well for its domain.
- gyrovagueGeist 3y agowell kinda... Numpy is rather slow relative to what you can build with a pure C/C++/Fortran/Rust pipeline. Its API usually prevents memory reuse, putting memory allocations on the critical path. You can't fuse operators. And, all of its operations aside from calls into BLAS (for example it's ufunc elementwise processing) are single threaded. People use numpy bc of the python ecosystem and all the domain specific libraries it is compatible with. It very fast relative to Python and provides aa stable, easy to use, array API.