Click here to Skip to main content
Sign Up to vote bad
good
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:02

Comments
SAKryukov - 4 Jan '12 - 12:55
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? --SA
Mehdi Gholam - 4 Jan '12 - 13:04
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

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?[^]
  Permalink  
Comments
Mehdi Gholam - 5 Jan '12 - 8:20
Thanks 5'ed, I have found TimSort which is promising...
Mika Wendelius - 5 Jan '12 - 15:38
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
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 373
1 OriginalGriff 335
2 Arun Vasu 315
3 Maciej Los 218
4 Aarti Meswania 180
0 Sergey Alexandrovich Kryukov 9,680
1 OriginalGriff 7,539
2 CPallini 4,018
3 Rohan Leuva 3,362
4 Maciej Los 2,951


Advertise | Privacy | Mobile
Web01 | 2.6.130523.1 | Last Updated 4 Jan 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid