Hi,

I am looking for a general advice to parallelize part of a code that I am 
writting. I have almost null experience on this matter, but I think that my 
case should be almost trivial.

I have a function F1 that takes several arguments (two objects of a custom TYPE 
and some numbers), and perform a mathematical computation which only depends of 
the paremeters, returning a DVec3. It is pretty fast, around 1 to 10 millons of 
executions per second (depending on a precision parameter) on my standard PC.

I want to define a function F2, that takes only two objects as the those 
mentioned above, and makes around 10 calls to F1 (passing the two objects and 
specific previulsy known values to to the remaining parameters). Then, collect 
them in sequence of DVec3.

Although a call to F2 is fast, I will need to call it millons of times (but not 
simultaneously). My wish is that every time I call F2, it computes in parallel 
the 10 calls of F1 (I mean, to excecute simultaneusly the F1s, each excecution 
in a different physical core).

I need it works in both, C and JS backends. I prefere simplicity and 
compatiblity/maintainability over maximum efficiency.

What is the way to go? I found may alternatives but I am not sure which should 
I choose (malebolgia, weave, taskpools, theads, threadpool).

Thanks!

Reply via email to