Re: New fast sorting algorithm (O(n))

2017-01-03 Thread Andrei Alexandrescu via Digitalmars-d
On 01/03/2017 03:01 AM, Nicholas Wilson wrote: https://probablydance.com/2016/12/27/i-wrote-a-faster-sorting-algorithm/ on reddit https://www.reddit.com/r/programming/comments/5lqgks/i_wrote_a_faster_sorting_algorithm/ In the reddit comments there's the one idea worth looking at:

Re: New fast sorting algorithm (O(n))

2017-01-03 Thread ketmar via Digitalmars-d
just to show a usecase, some code, ripped out from one of my simple engines (sorry for the mess): import std.stdio; enum ObjectCount = 1000; struct RadixSorter(OT) if (is(OT == class) && is(typeof(OT.init.sortkey) == uint) && is(typeof(OT.init.next) : OT)) { private: OT[256] heads;

Re: New fast sorting algorithm (O(n))

2017-01-03 Thread ketmar via Digitalmars-d
On Tuesday, 3 January 2017 at 08:01:59 UTC, Nicholas Wilson wrote: https://probablydance.com/2016/12/27/i-wrote-a-faster-sorting-algorithm/ on reddit https://www.reddit.com/r/programming/comments/5lqgks/i_wrote_a_faster_sorting_algorithm/ ah, radix sort again, trading memory for speed. it is

New fast sorting algorithm (O(n))

2017-01-03 Thread Nicholas Wilson via Digitalmars-d
https://probablydance.com/2016/12/27/i-wrote-a-faster-sorting-algorithm/ on reddit https://www.reddit.com/r/programming/comments/5lqgks/i_wrote_a_faster_sorting_algorithm/