I updated the jsperf test to reflect a bit better the scenario being discussed: http://jsperf.com/return-vs-no-return/4 It seems like v8 optimizes better callback(); return; than return callback();
On Friday, April 13, 2012 6:32:59 PM UTC-4, Ken wrote: > > I've updated that test to include a valueless return; which oddly seems to > be the least performant of the three (no return, return value, return > without value), but the differences are slight (in my extremely limited > testing). > > --Ken > > On Fri, Apr 13, 2012 at 2:21 PM, Jann Horn > <[email protected]<javascript:> > > wrote: > >> >> On Fri, Apr 13, 2012 at 08:48:21PM +0200, Oliver Leics wrote: >> If you're concerned that much about speed, you might want to hack in C or >> so. :D And if >> you believe in microbenchmarks: http://jsperf.com/return-vs-no-return >> > > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
