And the algorithm version may or may not actually be faster than Python. Essentially, the more abstract and generic things are (like Python), the more you can use them to easily do complex things arcoss different domains quickly. However, the actual concrete implementation is ultimately what matters as far as performance.
So, for example, Python may have a better algorithm, but C++ may use the hardware more efficiently.