On Wed, Sep 1, 2010 at 8:54 AM, John M Bliss <bliss.j...@gmail.com> wrote:
> <cfloop index="i" from="1" to="10000">
> <cfif not IsDefined("variables.anothervar" & i)>
> <cfset SetVariable("variables.anothervar" & i, i)>
> </cfif>
> </cfloop>

Try that with <cfset variables["anothervar" & i] = i /> - I suspect
setVariable() is slowing that down.

> <cfoutput>#Evaluate(getTickCount() - starttick)#</cfoutput>

You don't need evaluate() here BTW.

In general, micro-benchmarks like this aren't really useful. For
example, you're generating lots of whitespace here so you'd do better
to wrap the loops in <cfsilent> or write them in <cfscript>. There are
all sorts of variable factors in code like this.
-- 
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336719
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to