F
F
floppa3222019-04-20 17:27:29
Node.js
floppa322, 2019-04-20 17:27:29

NodeJs( V8 ) or C / C++ for heavy CPU operations ( > 100 Mlsec )?

Is it normal practice to write some hard-cpu piece of code with execution time, say, over 100 milliseconds for NodeJS in C/C++? Well, further integration with the node by creating a child process from the node / creating an addon.
Especially, for example, if the task is well parallelized, then one could even use CUDA.
As an example: suppose that for some end-point it is required to make a breadth-first traversal in a fairly large branched graph, the graph is parameterized by GET parameters, i.e. for each request, you will have to repeat the traversal (it is not possible to count 1 time in n seconds and cache the result somewhere).
So here's the question , so does anyone do it or are there any other approaches to solve similar problems?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question