Monday 18 April 2016

What make asynchronous code run faster than synchronous code ?

I understand the non-blocking part, you run your code more intelligently and you can deal with multiple request better.But lets say you run a bunch of instructions in node (operations on arrays), what difference does it make to run it sequencially or not if its run in a single threaded environnment at the end ? Shouldn't it be even slower using async for adding aditionnal overhead ?Is there scenario where running async code is actually faster than running sync code ? like when dealing with file system (read/write to the hard drive) ?

Submitted April 18, 2016 at 06:34PM by Jsnow25

No comments:

Post a Comment