Max Alekseyev on Thu, 19 Sep 2024 16:41:26 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

concurrent computation of a function


Hello,

Suppose I have two functions func1(x) and func2(x) computing the same entity, where depending on the input one may be much faster than the other (or vice versa).
For the same input x, I'd like to compute them in parallel and return the result as soon as one of them completes, and terminate execution of the other.
Is there a way to achieve this in PARI/GP?

PS. Here are possible solutions for SageMath/Python: https://ask.sagemath.org/question/59480/

Regards,
Max