[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE_2_2_BRANCH: kdelibs/kfile
From:       Michael Brade <Michael.Brade () informatik ! uni-muenchen ! de>
Date:       2001-09-27 11:15:35
[Download RAW message or body]

On Thursday 27 September 2001 15:01, Stephan Kulow wrote:
> On Thursday 27 September 2001 12:46, Michael Brade wrote:
> > On Thursday 27 September 2001 02:44, CVS by pfeiffer wrote:
> > > kdelibs/kfile kdiroperator.cpp,1.99.2.1,1.99.2.2
> > > kfileview.cpp,1.37,1.37.2.1 Author: pfeiffer
> > > Thu Sep 27 00:43:56 UTC 2001
> > >
> > >
> > > Modified Files:
> > >          kdiroperator.cpp kfileview.cpp
> > > Log Message:
> > > just some rearranging for the general case. Hmpf, spent quite some time
> > > trying to figure out why sorting my stresstest directory by filesize
> > > takes much longer than sorting by name. Reason is: worst-case scenario
> > > for quicksort (all items equal (0 bytes)). Doh.
> >
> > Hmm, what about Heapsort? ;-)
>
> How about a second comparision per name if both are equal?
Sounds like a good idea to me - in theory ;-)) It's just that you need some 
extra (not to say superfluous...) comparisons in case they are not the 
same... Hmm, and not to speak about how to find out which items are equal - 
this requires to sort them *first*. Ups...

Ciao,
  Michael

-- 

       Some operating systems are called `user friendly',
             Linux however is `expert friendly'.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic