Notes about moving from Python to C++


Python is fast to write and deliver results, but it is not a good choice when you cannot sacrifice any runtime. It is the time to switch to C++. But we certainly don’t want to give up the productivity available to Python, and we worry about the complexity of C++. The way to go is to design the backbone system in C++ and expose the API in Python. Then we can enjoy the capabilities coming from the complex compiler and scripting it just like Python. (Actually it is Python.)


Tools, concepts, and techniques to be introduced in this talk: * Python frame object * Building Python extensions using pybind11 and cmake * Inspecting assembly code * x86 intrinsics * PyObject, CPython API and pybind11 API * Shared pointer, unique pointer, raw pointer, and ownership * Template generic programming



Yung-Yu Chen

HPC software developer.