Right, but also keep in mind that: myIterator.column.columnName
Actually involves two struct lookups since the dot notation is really just shorthand for this: myIterator["column"]["columnName"] (I just tested that to make sure it works, and it does, fyi) So there are secretly two calls (struck lookups) being done under the hood. It just *looks* like less. Roland -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ben Rogers Sent: Thursday, February 24, 2005 2:34 PM To: [email protected] Subject: RE: [CFCDev] query object CFC Beta > But you have a function call to _set_ each variable, and that function > does far more than reading a single field. The two method/function calls in question are: myIterator.getColumn("myColumn") and... structInsert(this, columnName, columnValue, true) John's original code used dynamic evaluation, which should be slower than the structInsert() approach. If memory serves, in ColdFusion MX 6 (never tested 6.1) function calls to public methods, even if they were made from within the component itself but used the "this" scope, were much more expensive than calls to the same function without the "this" scope. That has no direct relevance to the conversation at hand, but it is precisely because of stuff like that that I'm not willing to say outright that one way is faster than another without first testing. > I'm not trying to rain on the parade, but this is really about > understanding > when it's OK to do something in order to simplify code at the expense of > performance and when it's not. Ahaha. You're not raining on my parade. I agree with you. I'm just trying to give John's method the benefit of the doubt. Ben Rogers http://www.c4.net v.508.240.0051 f.508.240.0057 ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
