Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <7605845.zP1Jr4sAA4@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Fri, 13 Sep 2013 05:23:08 +0200 User-Agent: KNode/4.10.5 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. <2406331.xsRxLlKTau@PointedEars.de> MIME-Version: 1.0 Lines: 22 NNTP-Posting-Date: 13 Sep 2013 05:23:08 CEST NNTP-Posting-Host: a38e1b9a.newsspool4.arcor-online.net X-Trace: DXC=K:jMO1NjXd9i6K;>iZ]7634IUK On 2013-09-13 03:17, Thomas 'PointedEars' Lahn wrote: >> What matters is the unnecessary repeated property access when the >> property value does not change. As a result, the “book alternative” >> (which IIRC were suggested here almost a decade ago, perhaps even by me) >> is considerably faster. > > Caveats about changing array lengths during the course of a loop aside, > what matters most is the implementation. Practically all modern JS > engines contain optimizations for the uncached alternative. In some rare > cases, they even test faster when array.length is (supposedly) checked > on each iteration. There are hundreds of tests about this on jsperf.com, > if you're curious. This nonsense has already been disproved. You are not paying attention. -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.