[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Number of articles




On Fri, 16 Jul 1999, Dean Giberson wrote:

> I believe the Quick sort is n (Log n). The bit field would give n. Also with 1000
> articles the memory for each hit is 1000 * 4 = 4000 bytes (4 is the size of a
> pointer). For a bit field it's 1000 / 8 = 125 bytes. That's 32 times difference, I
> forgot about the size of a pointer when I said 8 times.

If you say so. :-)  Thats why I decided to find someone else to do this...
they by default had to know more than me.
 
> I'm not saying I have to do it this way. It just seems to be more to
> your benefit. One problem is that I could not get the smallest article
> number with a bit field. So if that is nessecary then I will be glad
> to do the Quick sort.

The only reason I even mentioned quicksort was becuase that was the only
sorting algorithm I could remember from CS class in high school. :-)  I
figured you would figure out what I was thinking and take it from there.
 
Please, do what *you* want, I was just trying to give you an idea of where
I was coming from.  I'm sure your solution will be better than any idea of
mine.

-Aaron

> Aaron Turner wrote:
> 
> > On Fri, 16 Jul 1999, Dean Giberson wrote:
> >
> > > Do the articles have to be sorted? If they don't then the overhead involed in
> > > setting up a quick sort can be by-passed and I could use a bit field.
> >
> > I was just thinking that a quicksort alogrithm would be faster for a
> > large number of results since it reduces the number of comparisions.
> >
> > > The Add/Remove functions already exist. And the search/scan fuctions
> > > would let me go through the list in a liner fashion.
> >
> > If that's faster, cool.
> >
> > > The bit field cuts the memory by 8, since I can fit 8 checkes into one
> > > byte. And the code size is reduced since I'm using existing code.
> > > Win-win.
> >
> > I would be more concered optomizing for speed than memory usage.  We've
> > got 1GB of RAM.
> >
> > -Aaron
> >
> 

--
Aaron Turner, Core Developer       http://vodka.linuxkb.org/~aturner/
Linux Knowledge Base Organization  http://linuxkb.org/
Because world domination requires quality open documentation.