I have a function python(call it myFunction) that receives a list of numbers as input and, after a complicated calculation, returns the result of the calculation (which is a number ).
The function is as follows:
def myFunction( listNumbers ):
calcResult = 0
for i in xrange(0, len(listNumbers), 1):
return calcResult
I tested the function and it works as expected.
An myFunctionargument is usually provided listNumberscontaining 5,000,000 elements. As expected, the calculation takes time. I need this function to execute as quickly as possible
: , 5 , listNumbers 4999,999 . , LAST VALUE . 6 .
, (1- ): 6am. listNumbers, myFunction. , , myFunction ( , ). , - 6 .
(2- ): ( 5 ) listNumbers 4999,999 , myFunction, , (, ), - 6 - "" - . , 6 , , , 6 .
, myFunction . / , myFunction - ( ), , 1-?
, c++/numpy + cython/parallel computing .., . - , - , .