Answer the question
In order to leave comments, you need to log in
How to implement parallel computing?
Advise what to read and what platform to use (I was thinking about node.js) to solve the following problem:
for a group of objects (say up to 10000), some calculations must be performed in the background, and for each object there should be 1 second between a pair of calculations.
If you perform calculations by enumeration, then with the growth of the number of objects, the time between calculations of each object increases.
Answer the question
In order to leave comments, you need to log in
The node, though fast, is single-threaded. better take erlang or go.
Go is very well suited for such a task - you can start and calculate a separate goroutine for each of the objects
Depends on the type of calculation...
If you have a map and a lot of objects - you can use the overlay of the previous iteration to determine the shifted / changed objects (others - immediately exclude).
In difficult situations, a tree is created. As a result, you count only changed / moved objects, and not everything in a row.
You can also use the base for intermediate calculations:SELECT (17 + 23) / SQRT(64);
In general, there are many options for how this can be done. You can also tie CUDA / OpenCL.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question