Re: sorting large tables
Re: sorting large tables
- Subject: Re: sorting large tables
- From: Daniel Child <email@hidden>
- Date: Fri, 14 Mar 2008 13:46:49 -0400
Great suggestion. Thanks.
On Mar 13, 2008, at 5:00 PM, Ben Trumbull wrote:
One nice thing about sorting, is that this is easy to do: merge
sort. You can break up the problem as much as you want, and use any
handy sort function, and then merge the pieces together.
Algorithms for merging are readily available on the net. Ask
google. It's about 1 page of code to use qsort_r() and a hand
written merge function.
Merge sort is trivially parallelizable with NSOperationQueue, so
you can speed things up more when you're ready to tackle that.
It's 1 page of code to allocate, build dependencies, and run a
fully concurrent merge sort this way.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden