one of the lists is sorted. Can I you do < or > operators on strings
in flex?  

I think I'll sort the smaller compare list and use pointers to tell
where I am in the list.  I think I will only step through each list
once this way; which should be acceptable performance. 

if sorting the compare list takes a while I could make sure that it's
inserted/stored sorted.

Thanks for the help.  I'll repost to this after I implement it to let
everyone know how it works.

thanks

-Nate

--- In flexcoders@yahoogroups.com, "Doug Lowder" <[EMAIL PROTECTED]> wrote:
>
> If your list is already sorted, the performance of a binary search is 
> pretty hard to beat.  It'd probably still be a good choice even if 
> you have to perform the sort first.
> 
> You could also check out an associative array or dictionary, but I 
> don't know how well that will perform with thousands of properties.  
> One iteration through the first list to build the array, then a 
> single check to find an item.
> 
> 
> --- In flexcoders@yahoogroups.com, "Nate Pearson" <napearson99@> 
> wrote:
> >
> > The server I am running on is a 900mhz machine while the desktops at
> > work are 3.0 Pentium 4s.  I figured client side would be quicker.
> > 
> > I am filtering off on a string.  I there wasn't a nice computer
> > sciencey way to do it I was going to use pointers to jump around in
> > the sorted list.  
> > 
> > Any one else have any ideas?
> > 
> > 
> > --- In flexcoders@yahoogroups.com, Bjorn Schultheiss
> > <bjorn.schultheiss@> wrote:
> > >
> > > With a complex objects list this is difficult.
> > > I would suggest doing it server side.
> > > 
> > > If the lists contained numerical or string items  you could rely 
> on  
> > > sorting to make your iteration process shorter.
> > > 
> > > 
> > > Bjorn
> > > 
> > > 
> > > On 17/05/2007, at 4:36 AM, Nate Pearson wrote:
> > > 
> > > > What's the best practice when you have to compare two large 
> lists? My
> > > > main list is 9000 objects long. I have to compare this to 
> another
> > > > list which might have 4000 objects in it.
> > > >
> > > > Right now I'm doing it the WRONG way. For each row in the Main 
> list i
> > > > iterate through every item in the 4000 objects. As soon as I 
> hit a
> > > > match I return a true and that exits the iteration. This is 
> still a
> > > > very slow process.
> > > >
> > > > Both lists are dynamic.
> > > >
> > > > Any ideas on the right way to do this?
> > > >
> > > > Thanks,
> > > >
> > > > Nate
> > > >
> > > >
> > > >
> > >
> >
>


Reply via email to