Anonymous functions and performance node.js

They are performance effects when using anonymous JavaScript functions, which are also applicable to node.js programs, when most of the code in the wild is connected to the / http network and processing requests, connection requests, etc. are mostly performed through anonymous functions? Could this lead to performance degradation during a higher traffic load?

+3
source share
1 answer

It really depends on your code, and without measuring it, you may not know. But overall, you can be sure that the I / O latency far outweighs the time it takes to create callback functions to handle these I / O events. Therefore, in normal scenarios, there is probably no significant (or even not measurable) gain in optimizing callback creation. There are probably other areas where it’s easier to get performance and find them so you can profile your code.

+6
source

All Articles