Asa PhD researcher, it is crucial for my job to quickly code up an idea to see if it works or not. Python is an excellent tool enabling just that. It allows for focusing on the idea itself and not be bothered with boilerplate code and other tedious things.

However, Python comes with a major drawback: It is much slower than compiled languages like C or C++. So, what do we do after we tested an idea by building a Python prototype and now we want to turn it into a fast and performant tool? Most often than not, we end up doing twice the work and manually converting the Python code into C. Wouldn’t it be great, if our Python prototype itself could run faster? All the time spent on implementing everything twice could be used for something more meaningful and fun.

#c #compilers #programming #c++ #python

Run Your Python Code as Fast as C
2.80 GEEK