A bit off of this particular topic but this got me working with JavaCast( ) trying to influence the way CF handles the comparison operater. I wrote a blog post about it.
http://www.coldfusionmuse.com/index.cfm/2007/11/26/javacast.iterations The summary is that fiddling with the way CF handles comparisons doesn't offer much hope for appreciable gains. -Mark -----Original Message----- From: Brad Wood [mailto:[EMAIL PROTECTED] Sent: Monday, November 26, 2007 10:14 AM To: CF-Talk Subject: RE: cfswitch in cf8 > In any case, I don't really care about the "original topic". I was > responding to your response to Sean, which I thought was off-base. You had very good things to say about general performance tuning. Unfortunately my reply to Sean was specifically in the context of the original thread so general performance tuning tips were a little immaterial. > And, of course, the specific numbers you quoted to Sean were from your > iterative test. I think it's perfectly OK to critique the process by which > you gained those numbers, if you're going to use them as justification for > doing something one way or another. That's fair enough, and I do appreciate the critique. I do however feel that I've shown an iterative test to be a very good assessment for the specific bit of code that prompted my original post. If it helps, I did run the test originally for 10,000 iterations which, given my application, is a very realistic number to consider. While the comparison is less dramatic the cfswitch is still a full second slower which is significant enough to me not to use it in this specific situation. (47 ms / 1141 ms) My CIO has requested that the average page load time in our app be 3 seconds or less. Now I am being told to burn 1/3 of that time purely because a switch is more readable and it would be "dumb" to use a conditional structure known to be faster in CF7. Personally I think that advice stinks. :) > I would recommend that you investigate doing that conditional processing > > in a stored procedure if you can. I was waiting for that. :) What I am working on happens to be the interface for a generic reporting tool where we define dynamic criteria and write custom SQL in a proc for each report. It's very handy because only the SQL required to produce the results is all that's necessary to build a new report. The CF code in question displays results in a dynamic way formatting each value and aligning it with appropriate HTML etc as necessary based on the meta data available from the result set and the column types. I am always open to suggestions, but I would hard hardly call it the job of my SQL server to apply formatting and HTML to my data for obvious reasons-- the largest of which would be separation of data layer from display layer. Of course I could write an intermediate and generic proc which would format the result set before handing it to ColdFusion, but that would take more obfuscated dynamic SQL than I care to deal with. I would only resort to another language if what I wanted could not be accomplished quickly and easily in ColdFusion 7, and in this case it can-- with the cfif tag. :) ~Brad ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293826 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

