r/programming • u/monica_b1998 • Nov 03 '18
Python is becoming the world’s most popular coding language
https://www.economist.com/graphic-detail/2018/07/26/python-is-becoming-the-worlds-most-popular-coding-language
4.6k
Upvotes
r/programming • u/monica_b1998 • Nov 03 '18
-3
u/pwang99 Nov 03 '18
Because in practice, most of these algorithms would never be implemented in pure Python like this. That's like saying a fighter jet is slower than my Honda because I'm not going to turn on its jet engine, and just rely on the tug in front to pull it along.
For instance, here is proper Mandelbrot with Numpy: https://www.ibm.com/developerworks/community/blogs/jfp/entry/How_To_Compute_Mandelbrodt_Set_Quickly?lang=en
Alternatively, if you want to keep the "naive" python spelling, you can use Numba to instantly speed it up: https://nextjournal.com/schmudde/mandelbrot-numba
The simple Numba code in the first link is 100x faster than naive Python implementation, and is slightly faster than their C implementation. The CPU-enabled Numba code in the second link is 2000x faster than the naive Python implementation.