:neil_middleton

in more than 140 characters
  • scissors
    July 1st, 2007

    Last week, Ben Forta posted up some figures from the Adobe testing of CF8 running various tags over and over too see what sort of numbers came out the other end.  The result?  In Forta’s eyes, CF8 is “fast, really fast”.

    Not being one to just take this, I decided to do my own testing. Admittedly not the same sort of testing, but consistent across the three platforms I decided to test: Coldfusion 7.02, Coldfusion 8 (current Beta), and Bluedragon 7.0 .NET.  All these tests were carried out on Windows Vista and IIS7 on my laptop (hardware etc all exactly the same for each test).  All tests were run several times, and an average taken. Below is the various snippets of code I ran, and how long each system was taking:

    <cfloop from="1" to="10000" index="i">
    <cfset foo = createObject("component","foo")>
    </cfloop>

    CF7: 14000ms        CF8: 2100ms            BD.NET: 950ms

    <cfloop from="1" to="10000" index="i">
    <cfparam name="myName" default="dave">
    </cfloop>

    CF7:  31ms           CF8:16ms                BD:NET:135ms

    <cfloop from="1" to="1000000" index="i">     
    <cfset foo = "poo">
    </cfloop>

    CF7:  47ms           CF8: 31ms                BD:NET:1755ms

    <cfloop from="1" to="100000" index="i">     
    <cfset foo = arrayNew(1)>     
    <cfset arrayAppend(foo, "This is an item")>
    </cfloop>

    CF7:  350ms          CF8: 1500ms             BD:NET: 500ms

    <cfloop from="1" to="100000" index="i">     
    <cfset foo = structNew()>    
    <cfset foo.poo = "1">
    </cfloop>

    CF7:  500ms          CF8: 1266ms             BD:NET: 800ms

    <cfscript>     
    for (i=1;i lte 100000;i=i+1)     
    {        
    foo = structNew();        
    foo.poo = "1";    
    }
    </cfscript>


    CF7
    :  157ms          CF8: 78ms             BD:NET: 851ms 

    Now, you must realise that these are not a good way of testing how an application will run on any given server platform, but it does give you an insight into how they directly compare at a very simple level.  You should always test the performance of your own application on each to see how they fly (In theory you can do this for free using the 30 day trials CFMX and development/testing licence of BD.NET which happens to be free (Hear that Adobe??)

    After running through these tests, CF8 does appear to be the fastest overall, but is still hampered where it counts (for me, Array and Structure manipulation need to be as fast as possible).  BD.NET seems to be lagging somewhat behind (although I get the feeling that real world apps might run faster on this platform).

    Anyone else have any findings?

    Tags: