I do strongly belive using the IIF right wouldnt be any slower than CFIF as well Eg.. The right usage <cfloop index="x" from="1" to="10"> #x#.#IIF(x mod 2,"'odd'","'even'")#<br> </cfloop>
Improper usage which is any day going to be slower than CFIF <cfloop index="x" from="1" to="10"> #x#.#IIF(x mod 2,DE("odd"),DE("even")#<br> </cfloop> Joe Certified Advanced ColdFusion Developer [EMAIL PROTECTED] -----Original Message----- From: Michael Dinowitz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 16, 2002 1:28 PM To: CF-Talk Subject: Re: Writing efficient CFIF statements Actually, the main problem with using IIF() now is that few people know how to use it right. The double evaluation issue, using DE vs. double quoting, etc. I'm going to have to revise my paper on it and get it out there again. :) http://www.fusionauthority.com/iif.cfm > I wouldn't declare it dead for the sake of readability. That above > anything is a good reason not to use it. > > ~Todd > > On Tue, 16 Jul 2002, Michael Dinowitz wrote: > > > I really wish that people using my documents (originally posted in issues of FA) put down where they got the information from. I see chunks of information on that page taken directly from me. > > Now as for IIS() under MX. I've tested it heavily and there is literally no difference speed wise between IIF and CFIF. Counting on the run, you can see the numbers change in the .001 millisecond range which is nothing at all, especially as the numbers change for both and there is no clear pattern. > > That being said, I declare that the "best practice" of not using IIF() is dead as of MX. > > > > -- > ============================================================ > Todd Rafferty ([EMAIL PROTECTED]) - http://www.web-rat.com/ | > Team Macromedia Volunteer for ColdFusion | > http://www.macromedia.com/support/forums/team_macromedia/ | > http://www.flashCFM.com/ - webRat (Moderator) | > http://www.ultrashock.com/ - webRat (Back-end Moderator) | > ============================================================ > > ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. 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