3 ms·
Python is slower than most of the horses I bet on. That's pretty slow. The important - CPU intensive parts - of numpy, pandas, pytorch, and all the other "fast
by PaulRobinson 2y ago
Python is slower than most of the horses I bet on. That's pretty slow.
The important - CPU intensive parts - of numpy, pandas, pytorch, and all the other "fast python" libraries out there, are actually written in C.
Pure python should not be used for anything that requires good performance: it is programmer ergonomic, not CPU ergonomic. It is great that through the use of FFIs it has access to powerful libraries written in a language that isn't slow, but that does not make it as a language itself, fast.
- phplovesong 2y agoThats my point, pyton the is one of the slowest languages, and still have high quality, high perf libraries like numpy. PHP has no way to install deps that actually are written in asm/fortran or c.
- Dachande663 2y agoPHP still has PECL[0] which is a huge collection of C extensions. [0] https://pecl.php.net/ https://pecl.php.net/
- arkh 2y ago> PHP has no way to install deps that actually are written in asm/fortran or c. https://www.php.net/manual/en/book.ffi.php https://www.php.net/manual/en/book.ffi.php is not enough for your needs?