Thanks for the input on this stuff guys,

I think I can agree with you Chris, that was always my line of thought that
cfscript is nearer to the runtime code and will need less parsing and
compiling than the standard tag based code, I'd like to see some charted
data on this stuff, Maybe I'll arrange something to be put together, perhaps
some benchmark tests on core functions you'll find in many applications and
then compare the two methods.

If I had the time I've always been curious to time functions across my
entire application, having two versions, one running tagged code, the other
running script, but to be honest, I'm not that sad :-D

Thanks for your input guys,

Rob

-----Original Message-----
From: Christopher Jordan [mailto:[EMAIL PROTECTED] 
Sent: 01 May 2007 14:16
To: CF-Talk
Subject: Re: cfscript vs. cfml

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.
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276616
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