In your case, I wouldn't be so concerned about performance, this will
only be a small fraction compared to any database/filesystem things.

I would be concerned about readability/maintainability though. In your
example, I would rather use:

Parameters.AllowMultiEdit = "";
Parameters.AllowMultiAdd = "";
Parameters.TotalCols = ListLen(Variables.Fields)+2;
Parameters.FooterColSpan = ParameterGroup.TotalCols+1;

-------------------------------------------------------------
Hugo Ahlenius                  E-Mail: [EMAIL PROTECTED]
Project Officer                Phone:            +46 8 230460
UNEP GRID-Arendal              Fax:              +46 8 230441
Stockholm Office               Mobile:         +46 733 467111
                               WWW:       http://www.grida.no
-------------------------------------------------------------



| -----Original Message-----
| From: Matt Robertson [mailto:[EMAIL PROTECTED]
| Sent: Wednesday, January 14, 2004 03:36
| To: CF-Talk
| Subject: CFScript StructInsert or cfset. Which is faster?
|
| I have a collection of parameters that I keep in a struct.
| Mostly out of a perceived feeling that this is tidier.  I use
| cfscript for this sort of thing for speed.  It occurs to me I
| should ask Those Who Know... would it be faster to just use
| plain variables?  Or a 2d array?An example is below.
|
| <cfscript>
| Parameters=StructNew();
| StructInsert(Parameters,"AllowMultiEdit","");
| StructInsert(Parameters,"AllowMultiAdd","");
| StructInsert(Parameters,"TotalCols",(ListLen(variables.Fields)+2);
| StructInsert(Parameters,"FooterColSpan",ParameterGroup.TotalCols+1);
| </cfscript>
|
|
| --
| -------------------------------------------
|  Matt Robertson,     [EMAIL PROTECTED]
|  MSB Designs, Inc. http://mysecretbase.com
| -------------------------------------------
|
| --
|
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to