Click here to Skip to main content
11,805,316 members (66,341 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C#
Does any body know of a really fast sort algorithm for semi sorted items in a list which would beat the internal QuickSort of a List<T> in the .net framework?
Posted 4-Jan-12 3:02am
Mehdi Gholam288.8K
SAKryukov at 4-Jan-12 12:55pm
Good question (my 5), but I think the answer would depend on the definition of semi-sorted. You see, different algorithms works with different speeds on different data sets. When the data is random (still it would need the description of randomness, such as average size, total number...) you can do comparison. As soon as you say, "semi-sorted", there are different ways of getting this random semi-sorted state -- and comparison of algorithms can be different for different ways. Isn't it logical?
Mehdi Gholam at 4-Jan-12 13:04pm
I have an array of T (10000 items) which I sort then split in two. [ a new index I created for RaptorDB ] my profiler says about 20% of the time is in the quicksort routine, still twice the speed of b+tree.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Not saying which is fastest but you may find these interesting:
- A Comparison of Sorting Algorithms[^]
- Comparison of several sorting algorithms[^]
- The Fastest Sorting Algorithm?[^]
Mehdi Gholam at 5-Jan-12 8:20am
Thanks 5'ed, I have found TimSort which is promising...
Mika Wendelius at 5-Jan-12 15:38pm
Thanks, hopefully it performs better :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 315
1 Sergey Alexandrovich Kryukov 200
2 Richard Deeming 200
3 CPallini 160
4 CHill60 150
0 OriginalGriff 3,265
1 Maciej Los 1,990
2 KrunalRohit 1,907
3 CPallini 1,855
4 Richard MacCutchan 1,227

Advertise | Privacy | Mobile
Web04 | 2.8.151002.1 | Last Updated 4 Jan 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100