A guy in my CFUG did a comparison of the decompiled JIT code, and found 
that cfscript was faster. Sure if your example is:

<cfif (a eq b)>
  <cfset a = c />
</cfif>

vs.

<cfscript>
if (a eq b) { a = c; }
</cfscript>

.... then the difference is likely to be immeasurable, but for more 
complicated code that's not the case. Here's part of a post to my local 
CFUG's mailing list on the subject:

"Obviously, ColdFusion is middle ware for your middle ware. It is a
collection of servlets that consolidate Java functionality into one
tidy command. Calling a tag when you can script it out with one
cfscript block, simply creates another import and more code in the
final JIT. If you write the code in cfscript, it is closer to the end
result (Java) than if CF has to import more servlet libraries to get
to the final result.

Get yourself a java decompiler, write the code both ways in two
different files, decompile the JIT, and you'll see what I mean."

Does any of this mean that I stopped using CF tags altogether? No. But I 
use CFScript where I can, and where I think it will make a difference.

Just some more food for thought on this "age old" debate. :o)

Cheers,
Chris

Ben Nadel wrote:
> I can't remember where I saw it, but someone actually looked at the
> compiled code of CFScript vs. the compiles code of Tag based coding. The
> Cfscript compiles code did this thing where it shut off the white space
> buffer or something. I can't remember if this resulted in speed
> difference, or was just to point out that they compile differently? But
> if there is a speed difference, as Andrew says, now that its MX, its
> gonna be insignificant. 
>
>
> ......................
> Ben Nadel
> Certified Advanced ColdFusion MX7 Developer
> www.bennadel.com
>  
> Need ColdFusion Help?
> www.bennadel.com/ask-ben/
>
> -----Original Message-----
> From: Andrew Scott [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, May 01, 2007 6:40 AM
> To: CF-Talk
> Subject: Re: cfscript vs. cfml
>
> Pre MX that was the case, now there is no spped increase in cfscript
> over cfml anymore.
>
> As for preference, I think it is just that now preference.
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276612
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to