P
Phill
Anyone know the internal working of this thing. I expected it to be
kinda slow at enumerating large lists of objects but it was actually
pretty good. I was able to write a quick linked list class that beat
it at enumerating but was not as fast as the arrayList at actually
adding the items into the list.
This makes me think it is using something like linked arrays. Where
instead of allocating a new node each time an object is added it
allocates an array of say 10 objects and when all 10 are filled it
allocates a new array of 10 and links it w/ the previous array.
This would account for the speed difference. I wonder how it is so
fast at this though:
for(int i = 0; i < myArrayList.count; i++)
{
myArrayList;
}
How can this be fast? I'm not telling it I'm going in order so how
does it get such good speed at seemingly random access to the linked
list?
Thanks I'd appreciate any insite anyone may have.
kinda slow at enumerating large lists of objects but it was actually
pretty good. I was able to write a quick linked list class that beat
it at enumerating but was not as fast as the arrayList at actually
adding the items into the list.
This makes me think it is using something like linked arrays. Where
instead of allocating a new node each time an object is added it
allocates an array of say 10 objects and when all 10 are filled it
allocates a new array of 10 and links it w/ the previous array.
This would account for the speed difference. I wonder how it is so
fast at this though:
for(int i = 0; i < myArrayList.count; i++)
{
myArrayList;
}
How can this be fast? I'm not telling it I'm going in order so how
does it get such good speed at seemingly random access to the linked
list?
Thanks I'd appreciate any insite anyone may have.