Please be informed that the math module's methods are implemented in C.
It gives access to the mathematical functions specified by the C standard.
By using an efficient algorithm in C, you will defiantly get quick results.
If you want to learn python then do check out the below python tutorial video for better understanding: