DEV Community

Discussion on: Do you think Python is overrated ?

 
cicirello profile image
Vincent A. Cicirello

CUDA is a C/C++ interface enabling utilizing GPUs. It isn't a general purpose language that can be compared to C++. It is complimentary to C++, enabling utilizing hardware that you couldn't otherwise directly use. It is the GPU that is speeding things up in that case and not an alternative language.

In the case of numpy or scipy (both great libraries that I regularly use), the speed advantage comes because those libraries are native C implementations. The Python modules are just wrappers. If they were implemented directly in Python, they would be slow by comparison.

One of the advantages to Python is the combination of (a) it is relatively straightforward to provide a Python interface to C, and (b) its relatively simpler syntax, etc compared to other languages. This is likely why it has been so widely adopted in data science and scientific applications. All of the computationally intense stuff is actually implemented and compiled natively in C. The data scientists, etc, can then use these as needed from Python with its simpler syntax.