Hi all,
I've been approached by a colleague to look into speed test results for the
following situation. I have been a member of this list for a long time now
and closely followed (and implemented) the suggestions for using the Len()
function as opposed to the <CFIF myvariable IS ""> method. However, is it
quicker to use the following?

<CFIF Len(myvariable) IS 0>

OK, I know the first reaction is "no way." At least, that's what mine was!
BUT, after thinking about it for a minute, i realized that the 0 is *not* a
string (because I am not using quotes around it), and in machine code, the
number 0 is all zeros, which a computer processes the fastest of any
evaluation. Therefore, it would make sense to me that it is quicker for the
machine to process the zeros rather than having to search the results of
"Len(myvariable)" for a 1, which would evaluate the statement to false. I
realize that this might seem *extremely* tedious, but it does make a
difference. If someone with the ability to do some load testing has a second
to run a comparison and post your results, I would be forever grateful. I am
always in search of ways to speed up my templates, no matter how miniscule
the improvement is!

Regards,
Dave Carabetta.
Web Application Developer
------------------------------------------------------------------------------
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