I was reading a post on the cftalk list about interesting timing numbers via cf script and cfset. Read it here.

The post referenced a blog entry from Neil Middleton that published the timing numbers for doing some set statements via cf7, cf8, and bd.net. I noticed when reading the blog that the numbers posted were based on cf8 beta and not the release version. So, I decided to redo the tests posted and see how they differ from the post. Here is what I found...

Below is the code and the reported time from Neil's blog (CF8beta) and the result from my test (CF8.01). I did my test the same as his. Multiple runs, and reported the average times. The tests were ran on a WIN2003 Enterprise server (Quad 3.0 xeon / 2gb ram)

view plain print about
1<cfloop from="1" to="10000" index="i">
2<cfset foo = createObject("component","foo")>
3</cfloop>
CF8 BetaCF8.01
2100ms547ms

view plain print about
1<cfloop from="1" to="10000" index="i">
2<cfparam name="myName" default="dave">
3</cfloop>
CF8 BetaCF8.01
16ms5ms

view plain print about
1<cfloop from="1" to="1000000" index="i">
2<cfset foo = "poo">
3</cfloop>
CF8 BetaCF8.01
31ms36ms

view plain print about
1<cfloop from="1" to="100000" index="i">
2<cfset foo = arrayNew(1)>
3<cfset arrayAppend(foo, "This is an item")>
4</cfloop>
CF8 BetaCF8.01
1500ms39ms
view plain print about
1<cfloop from="1" to="100000" index="i">
2<cfset foo = structNew()>
3<cfset foo.poo = "1">
4</cfloop>
CF8 BetaCF8.01
1266ms52ms

view plain print about
1<cfscript>
2for (i=1;i lte 100000;i=i+1)
3{
4foo = structNew();
5foo.poo = "1";
6}
7
</cfscript>

CF8 BetaCF8.01
78ms60ms

So there you have it. It would appear that cf8.01 is even faster than the beta. However, the differences between 8 beta and 8.01 could be slanted due to machine performance differences.

--DAve