D
D
Denis2015-08-13 00:26:56
Game development
Denis, 2015-08-13 00:26:56

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

4 answer(s)
S
Sergey, 2015-08-13
Protko @Fesor

The node, though fast, is single-threaded. better take erlang or go.

A
Alexander Lozovyuk, 2015-08-13
@aleks_raiden

Go is very well suited for such a task - you can start and calculate a separate goroutine for each of the objects

X
xmoonlight, 2015-08-13
@xmoonlight

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);

V
Vladimir Martyanov, 2015-08-13
@vilgeforce

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 question

Ask a Question

731 491 924 answers to any question