>Seth, pardon me if this is a dumb question, but how do you know?

>From what I gleaned from Michael Dinowitz's excellent article on comparisons
(I can probably find the link if you like) recently, the first would be
faster because CF takes one less step:

(ignoring the Trim() because it affects both examples equally)
<CFIF Len(newpassword)>
1) Evaluate the length of the passed string.
2) Does a very fast boolean evaluation of the length.  If the number is 0
then the expression if false, otherwise it is true.

<CFIF newpassword IS "">
1) Evaluate newpassword
2) Evaluate the other operand, which in this case is ""
3) Compare the two using a string comparison

Not only does the first method force CF to take one less step, but the
evaluation of the length as a boolean is a faster operation than comparing
two strings.

Regards,
Seth Petry-Johnson
Argo Enterprise and Associates

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to