> On top of that, different variable types are faster than others - Arrays
are
> faster than Lists, Structures in Arrays are easy to work with, but
(slightly)slower than 2D+ arrays (as it has to look-up the position in the
> structure while 2D points to the exact location)

So if I need to loop over the contents of one column of a large query, which
would be faster:

<cfloop query="big_query">
...do stuff with #column1#...
</cfloop>

<cfloop list="#ValueList(big_query.column1)#" index="i">
....do stuff with #i#...
</cfloop> 

<cfset myarray=ListToArray(ValueList(big_query.column1))>
<cfloop index="i" from="1" to="#ArrayLen(myarray)#">
....do stuff with myarray[#i#]...
</cfloop>

this needs to be a <cfloop> since I'm using tags in it.

Thanks - Eric


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to