Relative Content

Tag Archive for pythonpython-3.xalgorithmmathoptimization

Multiplication of huge massive of numbers in python

I’m working on a small python program for myself and I need an algorithm for fast multiplication of a huge array with numbers (over 660 000 numbers, each is 9 digits). The result number is over 4 millions digits. Currently I’m using math.prod, which calculates it in ~10 minutes, but that’s too slow, especially if I want to increase amount of numbers.