|
Mailing Lists
|
Home / Groups / ColdFusion Talk (CF-Talk)
iif: am I understanding correctly?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 > 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. :) > >> <cfif didquery and didfind> >> <cfset temp = variables["getCust"][i]> >> <cfelse> >> <cfset temp = ""> >> </cfif> >> >> Does the same thing right? >> >> > 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. >> > >> > > 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. > > > > |
June 19, 2013
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||