OK, I ran cftimer on both examples, iif and the if/else way, and both came 
back 0 ms.  So I think in this case, since it's only looping over 10 list 
items or whatever, I'll stick with the leaner code.  Maybe if you were 
looping over thousands of list elements or query rows or something, there'd 
be a more noticeable performance hit.

-- Josh






----- Original Message ----- 
From: "Munson, Jacob" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Friday, July 21, 2006 2:05 PM
Subject: RE: iif: am I understanding correctly?


> Yeah, it should.  But the question is, is that faster or not?  Without
> running some tests with cftimer, I'm not sure.  But I'm always a fan of
> using less code, as long as it doesn't kill the server.  :)
>
>> -----Original Message-----
>> From: loathe [mailto:[EMAIL PROTECTED]
>> Sent: Friday, July 21, 2006 3:00 PM
>>
>> <cfif didquery and didfind>
>>  <cfset temp = variables["getCust"][i]>
>> <cfelse>
>>  <cfset temp = "">
>> </cfif>
>>
>> Does the same thing right?
>>
>> > -----Original Message-----
>> > From: Munson, Jacob [mailto:[EMAIL PROTECTED]
>> > Sent: Friday, July 21, 2006 4:43 PM
>> > To: CF-Talk
>> > Subject: RE: iif: am I understanding correctly?
>> >
>> > Does it?  I'm assuming you're referring to dynamic variables (from
>> > reading your other reply), but my cfif example has a
>> dynamic variable as
>> > well.
>> >
>> > > -----Original Message-----
>> > > From: loathe [mailto:[EMAIL PROTECTED]
>> > > Sent: Friday, July 21, 2006 2:37 PM
>> > >
>> > > But it executes much faster.
>
> This transmission may contain information that is privileged, confidential 
> and/or exempt from disclosure under applicable law. If you are not the 
> intended recipient, you are hereby notified that any disclosure, copying, 
> distribution, or use of the information contained herein (including any 
> reliance thereon) is STRICTLY PROHIBITED. If you received this 
> transmission in error, please immediately contact the sender and destroy 
> the material in its entirety, whether in electronic or hard copy format. 
> Thank you. A1.
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:247380
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to