Hello,
Todd Ashworth wrote:
> > Hello,
> >
> > My *guess* as to how CF handles it is to use a flag to determine if it has
> been set already - if this flag is set don't bother checking and/or setting
> the variable again.
>
> Any idea which is faster?
>
Again my guess would that *if* an application has set aside some specific information
concerning itself (for example flags variable lists, open files etc) it must be set up
in such a
way that look ups are going to be faster. To be honest I have not been able to find
much information on the specifics of how CF implements memory handling/variable
storage - although
I would very much like to get this info.
To look up in a list you have to simply get the key and check the value. The location
is already known.
To look up in memory you must first get the key, find where that key points to and
then check that value. (possibly more than one location to check until you get the
actual value you
are looking for)
>
> > The flags
> > could be stored in a fast access location rather than a variable look
> up/variable verification in memory somewhere.
>
> Such as?
>
Application cache, once the application gets processor time it can bring this
"Application cache" memory with it and therefore have access to very fast memory
,perhaps even within the
CPU's registers itself- (again I guess at the existence of this any ideas where more
techinal whitepapers could be found on CF ?)
Best regards always,
Nelson
>
> Todd Ashworth
>
> > Todd Ashworth wrote:
> >
> > > I'm not sure .. anyone else have an opinion?
> > >
> > > Todd Ashworth
> > >
> > > ----- Original Message -----
> > > From: Kym Kovan <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, July 04, 2000 7:46 AM
> > > Subject: Re: What am I doing wrong?
> > >
> > > > Hi Todd,
> > > >
> > > > >If you use <cfset> in the Application.cfm file, the <cfset> gets
> executed
> > > > >every time a page is loaded, regardless if the variable already has
> its
> > > > >value or not. If you use <cfparam name="application.datasource"
> > > > >default="mydsn">, the variable is only set if it doesn't already
> exist.
> > > I
> > > > >would guess this provides a slight performance increase which could
> > > really
> > > > >add up under heavy use.
> > > >
> > > > I wonder about that. <cfparam has to check for the existance of a
> > > variable,
> > > > then sets it if it is not there, <cfset just plain sets it.
> > > >
> > > > If we are talking template level variables then the <cfset is
> obviously
> > > > faster but at the application or server level scopes then which is
> faster
> > > a
> > > > check or a set? First time round the variable has to be set, but after
> > > that?
>
> ------------------------------------------------------------------------------
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.