@BrendanEich In JS array.length is a property.
Why is for(i=0;i<array,length;i++){} slower than
for(i=0,len=array,length;i<len;i++){} ?
-
-
Replying to @phidip
@phidip slower in what engine(s)? Did you put up a http://jsperf.com page? In unoptimized engines, var (local I hope!) beats property.1 reply 0 retweets 0 likes -
Replying to @BrendanEich
@BrendanEich this was in a very recent FF Aurora. 5 ms in a million iterations ;) will do more experiments. Basic research ;)4 replies 0 retweets 0 likes -
Replying to @phidip
@phidip@BrendanEich Can you link to the full testcase you're using?3 replies 0 retweets 0 likes -
Replying to @really_bz
@bz_moz@BrendanEich my testpage is at http://deformation.org/mdu/sem2/code/longloops.html …. I am running on FF Aurora 26.02 replies 0 retweets 0 likes -
Replying to @phidip
@phidip@BrendanEich For me, which loop is faster is random as I reload the page. And https://addons.mozilla.org/en-US/firefox/addon/jit-inspector/ … says they have identical code4 replies 1 retweet 1 like -
Replying to @really_bz
@bz_moz@BrendanEich 2. My Linux FF Aurora, and Opera both significantly longer elapsed AND SIGNIFICANT difference between loops.2 replies 0 retweets 0 likes
@phidip @BrendanEich In a clean profile, in the case of Firefox? Also, are you really using Aurora 26, not release 26???
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.