Bridging Python with C and C++
Python is great but it isn't suited for everything. Sometimes you may find that particular problems can be solved more easily with a different language. Those different languages may be better due to greater expressiveness for certain technical domains (like control engineering, image processing, or system programming) or offer natural performance gains over Python. And Python (together with default CPython implementation) has a few characteristics that aren't necessarily good for performance:
- Threading usability is greatly reduced for CPU-bound tasks due to the existence of Global Interpreter Lock (GIL) in CPython and is dependent on the Python implementation of choice
- Python is not a compiled language (in the way C and Go are) so it lacks many compile-time optimizations
- Python does not provide static typing and the possible optimizations that come with it
But the fact that some languages are better...