If you look the example code you will also immediately understand why Python is “slow”. Also for some easy performance gains Python should forfeit some of this dynamism and optionality and just give types like int (no subclassing).
This is the topic of the post if you keep reading :)
What would be nice is an official '@compile' decorator, but there already are a couple of attempts and none of them are (AFAIK) compelling enough to declare them the default.
I think the most compelling effort right now is Mojo [0]. Chris Lattner usually delivers, so I'm pretty bullish on Mojo.