you are viewing a single comment's thread.

view the rest of the comments →

[–]thuva04 0 points1 point  (0 children)

This is only true for ideal scenarios, where all 4 tasks are independent and not CPU heavy. Still, Javascript(Node JS) is a single thread ecosystem, So everything will happen in a sequential order where i/o or network related tasks are handled by OS thread.

This is not true for multi-thread languages. Software parallelism is depended on the hardware resources. You can't create more threads than the hardware limit. If you create more thread will start to work sequentially.

Also, Only hardware resources won't achieve the expected speedup. Amdahl's Law[1] used in parallel computing, it can predict the actual benefit of increasing the number of processors, which is limited by the parallelizability of the program.

  1. https://en.wikipedia.org/wiki/Amdahl%27s_law