So one iteration of the former executes in .811 milliseconds and the
latter .37 milliseconds? No one is ever going to notice that.

What someone who comes from any other language under the sun will
notice though, is that len() returns an int and not a boolean. So why
would someone be doing a boolean test on it?

-- 
jon
mailto:[EMAIL PROTECTED]

Friday, August 16, 2002, 3:25:14 AM, you wrote:

DB> Yes, but you also have to take performance into consideration

DB> Example

DB> <cfset myString = "">
DB> <cfloop from="1" to="1000" index="i">
DB> <cfif myString EQ "">
DB> Hello
DB> </cfif>
DB> </cfloop>
DB> Execution Time

DB> 811 milliseconds
DB> Compared to
DB> <cfset myString = "1"><cfloop from="1" to="1000" index="i"><cfif
len(myString)>>Hello</cfif></cfloop>
DB> Execution Time 370 milliseconds

______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to