Viewing a single comment thread. View all comments

username-requirement t1_j7j5ihu wrote

The critical factor to consider is whether the computation spends time in the python code or C/C++.

Many of the python language constructs are quite slow, and this is why libraries like numpy exist. The program spends relatively little time in the python code which is merely acting as an interpreted, rapid-to-modify "glue" between the compiled C/C++ library functions.

In the case of tensorflow and pytorch virtually all the computation is being done in C/C++ and python is basically acting as a highly flexible configuration language to do setup.

18