Re: [flexcoders] how light-weight is an array of custom objects if those custom objects already exist in another array?

2009-10-07 Thread Baz
Great, thank you!


On Wed, Oct 7, 2009 at 11:13 AM, Paul Andrews  wrote:

>
>
> Baz wrote:
> >
> >
> > Hi,
> >
> > I have an ArrayCollection of custom objects, and I need to create a
> > subset of those custom objects based on a condition (without using the
> > built-in filter() functionality). I am thinking of storing that subset
> > in a second array, but that is not mandatory - performance is key in
> > this piece of the app. If I did use a second array, how light-weight
> > would it be, are arrays extremely effecient constructs in general?
> > Also, in terms of the custom objects, I believe that they would all be
> > linked by reference, and not duplicated in the second array - is this
> > correct, and does that make the array basically the same as if it were
> > storing simple integers? Overall, is this the most effecient way of
> > getting a subset of an array?
>
> All objects are accessed by reference and essentially your proposed
> array would be an array of pointers, so it's about as lightweight as it
> can get.
>
> Paul
> >
> > Thanks!
> >
> >
> >
> >
> >
>
>  
>


Re: [flexcoders] how light-weight is an array of custom objects if those custom objects already exist in another array?

2009-10-07 Thread Paul Andrews
Baz wrote:
>
>
> Hi,
>
> I have an ArrayCollection of custom objects, and I need to create a 
> subset of those custom objects based on a condition (without using the 
> built-in filter() functionality). I am thinking of storing that subset 
> in a second array, but that is not mandatory - performance is key in 
> this piece of the app. If I did use a second array, how light-weight 
> would it be, are arrays extremely effecient constructs in general? 
> Also, in terms of the custom objects, I believe that they would all be 
> linked by reference, and not duplicated in the second array - is this 
> correct, and does that make the array basically the same as if it were 
> storing simple integers? Overall, is this the most effecient way of 
> getting a subset of an array?

All objects are accessed by reference and essentially your proposed 
array would be an array of pointers, so it's about as lightweight as it 
can get.

Paul
>
> Thanks!
>
>
>
>
> 



[flexcoders] how light-weight is an array of custom objects if those custom objects already exist in another array?

2009-10-07 Thread Baz
Hi,

I have an ArrayCollection of custom objects, and I need to create a subset
of those custom objects based on a condition (without using the built-in
filter() functionality). I am thinking of storing that subset in a second
array, but that is not mandatory - performance is key in this piece of the
app. If I did use a second array, how light-weight would it be, are arrays
extremely effecient constructs in general? Also, in terms of the custom
objects, I believe that they would all be linked by reference, and not
duplicated in the second array - is this correct, and does that make the
array basically the same as if it were storing simple integers? Overall, is
this the most effecient way of getting a subset of an array?

Thanks!