[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Number of articles
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 wrote:
>
> > Just a quick thought of how I invisioned this working:
> >
> > In Display::buildMatchList() you should be able to scan the list 'hits'
> > "*matches" that htdig generated. From there, start building a quicksort
> > tree, sorting each hit by the value of id in the URL. If during the sort
> > you find that the id already exists, just delete the entry from *matches.
> >
> > Hope that helps.
> >
> > On Fri, 16 Jul 1999, Dean Giberson wrote:
> >
> > > Jason Pincin wrote:
> > >
> > > > On the fly?
> > > >
> > > > Yes, but you'd need to hit MySQL from C++ with the MySQL libs and do a
> > > > fairly large query. Not sure if the performance hit there would warrant
> > > > your decreased data size.
> > > >
> > > > Let me know your thoughts.
> > > >
> > > > Jason
> > > >
> > > > On Thu, Jul 15, 1999 at 05:27:58PM -0600, Dean Giberson wrote:
> > > > > Is there a method to get a count of the current number of articles? This
> > > > > would let me reduce my algorithm data size by 8. This needs to be
> > > > > accessed in C/C++
> > >
> > > K, I'll go back to the drawing borad ;-)
> > >
> >
> > --
> > Aaron Turner, Core Developer http://vodka.linuxkb.org/~aturner/
> > Linux Knowledge Base Organization http://linuxkb.org/
> > Because world domination requires quality open documentation.
>
--
Aaron Turner, Core Developer http://vodka.linuxkb.org/~aturner/
Linux Knowledge Base Organization http://linuxkb.org/
Because world domination requires quality open documentation.