Re: [CVS] RPM: rpm/ CHANGES rpm/rpmdb/ librpmdb.vers merge.c rpmdb.c rpmdb...

2007-06-21 Thread Ralf S. Engelschall
On Thu, Jun 21, 2007, Jeff Johnson wrote: > There's a much deeper issue here. > > quicksort has known worst case performance, and rpm > usage is often near that worst case behavior point. You mean if the set is already pre-sorted or the pivot element is choosen badly? Sure, then quicksort's optim

Re: [CVS] RPM: rpm/ CHANGES rpm/rpmdb/ librpmdb.vers merge.c rpmdb.c rpmdb...

2007-06-21 Thread Jeff Johnson
There's a much deeper issue here. quicksort has known worst case performance, and rpm usage is often near that worst case behavior point. glibc quicksort switches to mergesort (iirc), other platforms do (or did) not. The difference in behavior is dramatic, like 6 hours becomes 6 minutes. Be