timer: Improve performance of callbacks · nodejs/node@bd1bd7e · GitHub
Skip to content

Commit bd1bd7e

Browse files
RubenVerborghtrevnorris
authored andcommitted
timer: Improve performance of callbacks
setImmediate, setTimeout, and setInterval were called in an inefficient way, especially in the presence of arguments. This optimization improves their performance, with special cases for up to 4 arguments. Performance of setImmediate increases with 35%, setInterval with 60%, setTimeout with 70%. PR-URL: #406 Reviewed-by: Trevor Norris <trev.norris@gmail.com> Reviewed-by: Christian Tellnes <christian@tellnes.com>
1 parent 6190a22 commit bd1bd7e

1 file changed

Lines changed: 97 additions & 33 deletions

File tree

‎lib/timers.js‎

Lines changed: 97 additions & 33 deletions

0 commit comments

Comments
 (0)