Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #21319
| Message-ID | <7605845.zP1Jr4sAA4@PointedEars.de> (permalink) |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Organization | PointedEars Software (PES) |
| Date | 2013-09-13 05:23 +0200 |
| Subject | Re: loop through an arry |
| Newsgroups | comp.lang.javascript |
| References | <l0tb6o$8a5$1@dont-email.me> <b7567773-4470-4827-b2a2-3e1057c303fe@googlegroups.com> <2406331.xsRxLlKTau@PointedEars.de> <l0tt67$ge1$1@news.albasani.net> |
Stefan Weiss wrote: > 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.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
loop through an arry "Tony Johansson" <johansson.andersson@telia.com> - 2013-09-12 23:19 +0200
Re: loop through an arry Adrián Espinosa <mortuuslordofdeads@gmail.com> - 2013-09-12 14:30 -0700
Re: loop through an arry Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-09-13 03:17 +0200
Re: loop through an arry Stefan Weiss <krewecherl@gmail.com> - 2013-09-13 04:27 +0200
Re: loop through an arry Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-09-13 05:23 +0200
Re: loop through an arry Stefan Weiss <krewecherl@gmail.com> - 2013-09-13 05:36 +0200
Re: loop through an arry "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-09-13 09:48 +0200
Re: loop through an arry Ken <usenet-so@abdiassoftware.com> - 2013-09-12 16:35 -0500
Re: loop through an arry Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-09-12 16:39 -0700
Re: loop through an arry Ken <usenet-so@abdiassoftware.com> - 2013-09-12 19:45 -0500
Re: loop through an arry Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-09-13 11:18 -0700
Re: loop through an arry Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-09-14 01:49 +0200
Re: loop through an arry Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-09-13 17:06 -0700
csiph-web