This link has been bookmarked by 42 people . It was first bookmarked on 28 Jul 2008, by Forrest Cao.
-
20 Oct 11
-
31 Oct 10
acazsouzafor (var i=0, node; node = hColl[i++];) { // do something with node }
javascript performance code loop programming optimization for:@twitter
-
21 Sep 10
-
In reference to the various comments about reverse counting, the reason checking against 0 is faster then <length, etc is that the ordinal operators <,<=,>, and >= are polymorphic (in the general case -- a sufficiently advanced interpreter may be able to infer types perhaps?) so these operators require type checks on both left and right sides of the operator to determine what comparison behaviour should be used.
In general you should also use the strict === rather than ==, as == will eventually fall back on toString conversion and string comparison.
-
-
17 Aug 10
-
12 Jul 10
-
11 Jul 10
-
10 Jul 10
-
21 Dec 09
-
05 Nov 09
-
25 Aug 09
-
05 Aug 09
-
01 Dec 08
-
27 Aug 08
-
23 Aug 08
-
What's the Fastest Way to Code a Loop in JavaScript?
-
-
11 Aug 08
-
04 Aug 08
-
02 Aug 08
-
30 Jul 08
-
29 Jul 08
-
28 Jul 08
-
27 Jul 08
-
26 Jul 08
-
25 Jul 08
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.