bug-gnustep
[Top][All Lists]
Advanced

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

[bug #37130] NSArray does not implement sorting and insertion assuming s


From: Fred Kiefer
Subject: [bug #37130] NSArray does not implement sorting and insertion assuming sorted
Date: Sat, 18 Aug 2012 14:33:07 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1

Follow-up Comment #3, bug #37130 (project gnustep):

I had a look at his code and think that most of it should be fine to merge,
even without a copyright assignment. Most of the code size are method and
constant declarations, no problem here. The merge sort itself is a standard
implementation (although I would like to see it rewritten to do less array
copying. Maybe we could create one mutable array at the start and sort that
inplace? This sounds like the missing method NMutableArray
-sortWithOptions:usingComparator:)

The only code that includes real genuine ideas is the method 
-indexOfObject:inSortedRange:options:usingComparator: which is nicely written.
Not sure how to handle that.

We should also stop a minute here and rethink the different sorting
implementations in base. In NSArray.m we already have a shell sort and in
NSSortDescriptor.m a quicksort implementation. Could we base all these on this
new implementation?

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?37130>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]