   Fastest Sorting Algorithm
  What is the fastest generic sorting algorithm?I heard QSort is the fastest.  I recently developed a linear sorting algorithm, and I was wondering if that is significant at all.Matthew Sherwood 
  it all depends.....anything special about your data ?  how many elements are to be sorted ?  etc...   "A soldier is a part of the 1% of the population that keeps the other 99% free"  - Lt. Colonel Todd, 1/38th Infantry, Ft. Benning, GA ;  It all depends on what you are sorting.  As well as the situation. ;  It depends on whether your sorting algorithm makes assumptions as to the nature of its input. There already exist linear-time O(n) sorting algorithms for such special cases, but it is demonstrably impossible to get below log-linear O(n.log n) in the general case.Quicksort is fast in practice, but its worst-case is still O(n^2). Mergesort has a O(n.log n) worst-case.   “Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”    — Brian W. Kernighan (C programming language co-inventor);  Yes I know it depends on data.  What I am aiming at is best average performance over many different data sets.Matthew Sherwood ;  My Algorithm makes no assumptions about data and has posted a linear time across large variances in data.  My algorithm has no worst case, it always does the same work.Matthew Sherwood ;  No -- they mean it depends on what assumptions you can make about your data as a whole, not how it''s arranged.  For example, does it all fall within some range?  ;quote:Original post by msherwood  My Algorithm makes no assumptions about data and has posted a linear time across large variances in data.  My algorithm has no worst case, it always does the same work.Go ahead, show your work.   “Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”    — Brian W. Kernighan (C programming language co-inventor);  Somehow, I suspect that he reinvented the radix sort. ;  Alright, where could I post a .exe?Matthew Sherwood 