Though I'm pretty certain arrays aren't handled in linked-list fashion... Anything is possible I suppose, given that the syntax is just that and the underlying mechanic could be just about anything. But the array data type has been around for a good long while, long before the advent of OO which is where the linked-list comes from. And since each entry in the array is a simple value, the object required for each item in the array to implement it as a linked list would require all the extra memory to store a pointer to the class and its methods for traversing the list, etc. all of which is going to soak up more resources and make it take longer to return a result. As compared to simply assigning memory address xxxx-yyyy as the array and knowing that the integer value at xxxx tells you how many entries there are in the array with e ach subsequent integer value being a pointer to a memory address where the value for that item is stored (null if no value is assigned).
ike
lord, I was born a ramblin man :)
------ Original Message ------
From: Jack Lavender <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
CC:
Sent: Aug 28, 2003 10:13 AM
Subject: RE: structures vs arrays
I thought that arrays in CF were variable sized. That would imply a type of "link-list" underlying mechanism rather than a contiguous block.
Probably always need the head of the array to get to the desired location. Thus random access could suffer some penalty.
Structures are keyed. so probably there is hash kept on the side to speed up random access into the data storeage area. (n-leaf tree structure)
just thoughts in the wind.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Balaji Mahadevan
Sent: Thursday, August 28, 2003 9:57 AM
To: [EMAIL PROTECTED]
Subject: Re: structures vs arraysNeedless to say Structures are most efficient than arrays bcoz of their in-herent data type composition. Structures are similar to pointers. (correct me if am wrong)
Balaji Mahadevan
From: "Schreck, Tom" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: <[EMAIL PROTECTED]> Subject: structures vs arrays Date: Thu, 28 Aug 2003 09:16:06 -0500 Which one is more efficient at retrieving data: structure or an array? Thanks - Tom Schreck 817-252-4900 [EMAIL PROTECTED] I have not failed. I've found 10,000 ways that won't work. - Thomas Edison
Get MSN 8 and help protect your children with advanced parental controls.
