|
|
|
|
|
by ThePhysicist
1633 days ago
|
|
Meh, Python really shines at I/O and gluing together C/C++/Fortran code. It's reasonably fast for most tasks, and if it isn't there are tools like Cython that make it pretty trivial to write Python code that achieves C-like execution speed (because it effectively compiles to C code). |
|
However, Python really doesn't shine when compared with other memory safe languages like Go, Rust, and Java.
Ultimately, Python is single-threaded by design. There are some hacks to get around this design contraint (multi-processing), but then you are adding an entire additional Python runtime to your system's memory for every "thread" you want to run. Even with asyncio, Python performs the worst when it comes to I/O.
I love Python, but it's important to understand that due to specific design considerations it is not and will likely never be a performant language.
reference: https://medium.com/star-gazers/benchmarking-low-level-i-o-c-...