So, I decided to run a few very simple tests to see what the impact of CreateObject was on a large dataset. I put together a CF script with a loop to create 5000 objects using CreateObject (with init), another for 5000 with CreateObject (without init), another to simply duplicate a template Object and another to create 5000 structs. The breakdown and the code follow:

Test

Iterations

Elapsed Time (ms)

ms/Instance

structTest

5000

157

0.0314

FullCreateTest

5000

17468

3.4936

createTest

5000

16610

3.322

dupeTest

5000

12469

2.4938

structTest

5000

15

0.003

This was run on a CF8 Box with JRun running on Java 1.5I had similar results on a CFMX 7 Box with JRun running on Java 1.42The option of rolling query results into typed structs is really a lifesaver given the performance numbers.