Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion peeves & current best practices?

Date: Fri, 12 Oct 2012 05:34:10 -0700 (PDT)
From: Tristan Slominski <tristan.slomin...@gmail.com>
To: nodejs@googlegroups.com
Message-Id: <8ca551b1-2593-4188-b195-42f0e9df24ee@googlegroups.com>
In-Reply-To: <0c48b94d-dfee-4a9c-89da-b7beb123ea12@googlegroups.com>
References: <dc8c3771-5e2e-4cf0-b3ed-3815579692cb@googlegroups.com>
 <CACrj35Ef4hJk6VzUoMV-mx6gFa21AkTAdGG69S6MsvGQKcYa=Q@mail.gmail.com>
 <19915e11-ff2a-4014-8ed9-17646669ee6c@googlegroups.com>
 <CACrj35ER2iuxOFSgsikVWT3Z2q8B4V2NEU6Qgk+L7jXCweQiww@mail.gmail.com>
 <CAGkHjAVsbJzOJDHTdDfQzAKfkG-DnOko7Zyq8d4fe0RwA7O_vA@mail.gmail.com>
 <0c48b94d-dfee-4a9c-89da-b7beb123ea12@googlegroups.com>
Subject: Re: [nodejs] peeves & current best practices?
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_897_9028916.1350045250419"

------=_Part_897_9028916.1350045250419
Content-Type: multipart/alternative; 
	boundary="----=_Part_898_15855293.1350045250419"

------=_Part_898_15855293.1350045250419
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

On Thursday, October 11, 2012 1:24:12 AM UTC-5, Tim Oxley wrote:

> Great writeup!  Most these points are right on.
>
>
> Thanks Tim! Positive feedback is welcome. 
>  
>
>> But I've also been severely bitten by 
>> the performance and race-condition implications of this.
>
> ...
>> I've seen many cases where it's better and simpler to 
>> just call right away.  
>
>
> Can you give me an example?
>
>
 Tim, we ended up with some nextTick benchmarks a while back. Here is my 
latest output for node v0.8.11:

loopsPerSecond: 431034482.8, nextTicksPerSecond: 1616854.4, ratio: 266.6x 
times faster
loopsPerSecond: 434782608.7, nextTicksPerSecond: 1580382.8, ratio: 275.1x 
times faster
loopsPerSecond: 432900432.9, nextTicksPerSecond: 1582450.1, ratio: 273.6x 
times faster
loopsPerSecond: 436681222.7, nextTicksPerSecond: 1591237.3, ratio: 274.4x 
times faster

benchmark here: https://gist.github.com/1512111 (forked 
from https://gist.github.com/1511972)
discussion 
here: https://groups.google.com/forum/#!topic/nodejs/PErl27A4e-A/discussion

------=_Part_898_15855293.1350045250419
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On Thursday, October 11, 2012 1:24:12 AM UTC-5, Tim Oxley wrote:<br><blockq=
uote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-lef=
t: 1px #ccc solid;padding-left: 1ex;"><div><blockquote class=3D"gmail_quote=
" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color=
:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Great writeup! =
&nbsp;Most these points are right on.</blockquote><div><br></div><div>Thank=
s Tim! Positive feedback is welcome.&nbsp;</div>&nbsp;</div><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;=
border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex=
">But I've also been severely bitten by&nbsp;<br>the performance and race-c=
ondition implications of this.</blockquote><blockquote class=3D"gmail_quote=
" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color=
:rgb(204,204,204);border-left-style:solid;padding-left:1ex">...<br>I've see=
n many cases where it's better and simpler to&nbsp;<br>just call right away=
.&nbsp;&nbsp;</blockquote><div><br></div><div>Can you give me an example?<b=
r><br></div></blockquote><div><br></div><div>&nbsp;Tim, we ended up with so=
me nextTick benchmarks a while back. Here is my latest output for node v0.8=
.11:</div><div><br></div><div><div>loopsPerSecond: 431034482.8, nextTicksPe=
rSecond: 1616854.4, ratio: 266.6x times faster</div><div>loopsPerSecond: 43=
4782608.7, nextTicksPerSecond: 1580382.8, ratio: 275.1x times faster</div><=
div>loopsPerSecond: 432900432.9, nextTicksPerSecond: 1582450.1, ratio: 273.=
6x times faster</div><div>loopsPerSecond: 436681222.7, nextTicksPerSecond: =
1591237.3, ratio: 274.4x times faster</div></div><div><br></div><div>benchm=
ark here: https://gist.github.com/1512111 (forked from&nbsp;https://gist.gi=
thub.com/1511972)</div><div>discussion here:&nbsp;https://groups.google.com=
/forum/#!topic/nodejs/PErl27A4e-A/discussion</div>
------=_Part_898_15855293.1350045250419--

------=_Part_897_9028916.1350045250419--