When called within an I/O cycle, `setImmediate` is generally faster because it is designed to execute immediately after the current I/O event completes, whereas `setTimeout(0)` gets placed in the timers queue and might be subject to delays. > The main advantage to using setImmediate() over setTimeout() is setImmediate() > will always be executed before any timers if scheduled within an I/O cycle, > independently of how many timers are present. * https://nodejs.org/en/learn/asynchronous-work/event-loop-timers-and-nexttick#setimmediate-vs-settimeout * https://nodejs.org/en/learn/asynchronous-work/event-loop-timers-and-nexttick#poll * https://nodejs.org/en/learn/asynchronous-work/understanding-setimmediate