Answer the question
In order to leave comments, you need to log in
Does it make sense to do a lot of calculations in NodeJS?
How to effectively perform a large number of floating point calculations on NodeJS?, tell me modules)) without TS and other transpliers.
As far as I know, JS is not suitable for floating point calculations, right?
Answer the question
In order to leave comments, you need to log in
"TS and other translators."
they are also compiled to js and the speed is the same. (although it is possible that some of them use typed arrays, see below)
any libraries are dropped for the same reason. the only bonus from libraries can be when working with gigantic numbers.
As far as I remember in the number node, everything is int32. when an integer exceeds these limits, it turns into a float where the lower digits (for an integer) are preserved up to 2 ^ 59, which seems to be quite good.
regarding optimization in libraries related to powerful calculations (3d mathematics) (on the frontend) they often use typed arrays of type Int32Arrayat least less memory and possibly more optimized calculations. most interesting what is on the server in this regard.
JS doesn't accurately calculate, for example:
here for more details https://learn.javascript.ru/number#imprecise-calculations
and I don’t say anything about performance, but js should show itself well, especially if there are a lot of asynchronous calculations.
As far as I know, node.js can access the graphics card, which is great for complex distributed computing. If you understand this topic - unsubscribe, I will be grateful)
In addition, you can always write a library in C ++, which is easily integrated into the node.js environment.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question