On Jun 1, 2012, at 6:29 PM, Jorge wrote: > On May 30, 2012, at 12:57 AM, Tim Caswell wrote >>> On Tue, May 29, 2012 at 5:22 PM, Jorge <jo...@jorgechamorro.com> wrote: >>> >>> FYI: setImmediate === nextTick and identical to a setTimeout(f,0) without >>> the clamping. >> >> so I guess in a way setImmediate(fn) could be described fairly accurately as >> a faster setTimeout(fn, 0). As I understand timer events get put at the end >> of the queue as well. >> >> <snip> > > LOL, see "nextTick(f) vs SetTimeout(f, 0)" (it's from ~ 2 years ago :-P): > > <http://groups.google.com/group/nodejs/browse_thread/thread/b564ac42ac53e424/7b85530b465f578d> > -- > Jorge.
A jewel from that thread: On Aug 30, 2010, at 4:36 AM, Tim Caswell wrote > On Aug 29, 2010 6:43 PM, "Vitali Lovich" <vlov...@gmail.com> wrote: >> That setTimeout(f, 0) can be optimized to perform significantly better than >> it currently does. > > Why complicate the code for a use case that shouldn't exist? Namely using > setTimeout when you really mean nextTick. > > <snip> :-P -- Jorge.