That's about the only difference according to these results. It is faster, but since I use a lot of snippets to do sets etc., even that isn't the case. All I end up doing is typing the variable name, and that's about the same effort using cfset or within a cfscript block.
> I don't think <cfscript> has been faster than tags since early MX > (6.0? 6.1?), and even then, I'm not sure it was significantly faster > in an average page. > > what *is* faster, when setting large blocks of variables, is the time > it takes to type. > > <cfset myfirstvariable = "a" /> > <cfset mysecondvariable = "b" /> > <cfset mythirdvariable = "c" /> > <cfset myfourthvariable = "d" /> > <cfset myfifthvariable = "e" /> > > myfirstvariable = "a"; > mysecondvariable = "b"; > mythirdvariable="c"; > myfourthvariable="d"; > myfifthvariable="e"; > > just less verbose by virtue of the fact that you don't need to type > out the "cfset" or the brackets. maybe that's what they meant by > "faster when setting large blocks of variables"? > > On Tue, Jul 1, 2008 at 6:28 PM, Larry Lyons <[EMAIL PROTECTED]> > wrote: > > OK I got into a discussion at my new job about setting variables by > the cfset tag or via a variable assignment using cfscript. The > consensus has been that when setting large blocks of variables using > cfscript is faster than cfset. The reason that tags are slower is that > when the template JITs, it adds extra libraries into the class. So > when you use cfscript, your code needs fewer cftag libraries mentioned > as Java import namespaces because your code is closer to the native > Java and requires less overhead. Also, the tag named import also > contains functionality you may not be using. Therefore, you have > thinner JITs and faster code.Or so I thought. Here's some code I wrote > to test this: > > -- > A byte walks into a bar and orders a pint. Bartender asks him "What's > wrong?" Byte says "Parity error." Bartender nods and says "Yeah, I > thought you looked a bit off. " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Community/message.cfm/messageid:263228 Subscription: http://www.houseoffusion.com/groups/CF-Community/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
