have you looked into https://en.wikipedia.org/wiki/Strassen_algorithm strassen multiplication and karatsubas algorithm for multiplication? https://en.wikipedia.org/wiki/Karatsuba_algorithm apparently its the one python uses. I just recently learned it and I find it very interesting.