C++ Vs. Python

Python takes care of memory management, trash collection, is an interpreter, has easy to understand syntax readability, and tends to have better development speed but slower run-time speed.

In layman terms, turning off unused electronics is taken care of, trash is collected by someone else, you can detect bugs or defects faster, uses simpler language, and it takes very little time to develop but more time to serve when live.

C++, on the other hand, does not take care of memory management and trash collection, is a compiler, has complex syntax readability, and has better run-time speed but slower development time.

In layman terms, you must turn off the electronics, take care of the trash, finding bugs could be harder, uses Shakespearean language, and takes a lot more time in development but it faster when live.

One thing that is clear and obvious - Python is easier and simpler than C++. But not necessarily better.

By compiling all at once, you get speed. You develop something normally once which takes time. But, run-time speed is more critical than development speed.

A lot of recent machine learning code is being written in Python and run in C++. Python, which is easier to read and write for a less technical person is in use and C++ code is being created by the frameworks. I think that over time, the gap will continue to grow even more.

Tensorflow is C++ with a thin Python wrapper over it. Try using the C++ API and you’ll understand why they created the wrapper. It’s got all the speed of C++.

A big part of the current ecosystem of development is learning. This was fundamentally started by the implementation of back propagation, the rise of computational power and the availability of lots of data.

These factors lead to a paradigm of development where performance and scale are required even at the level of research. Another factor is that the basis of the solutions is not analytical. As such testing is done by trial and error. This means we now need statistical experts to do work that would often require high quality, highly optimized code. Many frameworks such as NVIDIA’s work with ML frameworks like Tensorflow have tried to fill the gap.

This is a natural singularity from the elements that are driving the recent resurgence in machine learning development. Think about all the things in which AI applications are going to be deployed on, self-driving cars, security cameras, mobile phones, various purpose-built devices, military devices, we’re going to need C++ frameworks for this.

Leave a Reply

Your email address will not be published. Required fields are marked *