digitalmars.D - array.sort - What algorithm is being used here?
- Daniel Harper (4/4) Sep 16 2012 It's not clear in the documentation
- jerro (4/8) Sep 16 2012 It is. The source is here
- Daniel Harper (3/13) Sep 16 2012 Thanks for the prompt reply.
- deadalnix (2/15) Sep 16 2012 I'd argue that .sort must be blasted out of existence.
- Jonathan M Davis (6/7) Sep 16 2012 I can't remember if it was agreed that it should be deprecated or not. T...
- Peter Alexander (5/15) Sep 16 2012 It's on the deprecated list (3rd from bottom):
It's not clear in the documentation (http://dlang.org/arrays.html) what sorting algorithm is being used behind the array.sort implementation. Can anyone shed any light? I.e. is it quicksort?
Sep 16 2012
On Sunday, 16 September 2012 at 20:29:50 UTC, Daniel Harper wrote:It's not clear in the documentation (http://dlang.org/arrays.html) what sorting algorithm is being used behind the array.sort implementation. Can anyone shed any light? I.e. is it quicksort?It is. The source is here https://github.com/D-Programming-Language/druntime/blob/master/src/rt/qsort.d . You should probably be using std.algorithm.sort, though.
Sep 16 2012
On Sunday, 16 September 2012 at 20:52:03 UTC, jerro wrote:On Sunday, 16 September 2012 at 20:29:50 UTC, Daniel Harper wrote:Thanks for the prompt reply. Perhaps the documentation can be updated to reflect this?It's not clear in the documentation (http://dlang.org/arrays.html) what sorting algorithm is being used behind the array.sort implementation. Can anyone shed any light? I.e. is it quicksort?It is. The source is here https://github.com/D-Programming-Language/druntime/blob/master/src/rt/qsort.d . You should probably be using std.algorithm.sort, though.
Sep 16 2012
Le 17/09/2012 00:29, Daniel Harper a écrit :On Sunday, 16 September 2012 at 20:52:03 UTC, jerro wrote:I'd argue that .sort must be blasted out of existence.On Sunday, 16 September 2012 at 20:29:50 UTC, Daniel Harper wrote:Thanks for the prompt reply. Perhaps the documentation can be updated to reflect this?It's not clear in the documentation (http://dlang.org/arrays.html) what sorting algorithm is being used behind the array.sort implementation. Can anyone shed any light? I.e. is it quicksort?It is. The source is here https://github.com/D-Programming-Language/druntime/blob/master/src/rt/qsort.d . You should probably be using std.algorithm.sort, though.
Sep 16 2012
On Monday, September 17, 2012 00:42:40 deadalnix wrote:I'd argue that .sort must be blasted out of existence.I can't remember if it was agreed that it should be deprecated or not. Too many items like that are _supposed_ to be deprecated (with Walter's full agreement) but still persist, but I don't remember if Walter agreed to axe this one or not. I definitely think that it should go though. - Jonathan M Davis
Sep 16 2012
On Monday, 17 September 2012 at 00:09:36 UTC, Jonathan M Davis wrote:On Monday, September 17, 2012 00:42:40 deadalnix wrote:It's on the deprecated list (3rd from bottom): http://dlang.org/deprecate.html No schedule for deprecation though. Just says "future".I'd argue that .sort must be blasted out of existence.I can't remember if it was agreed that it should be deprecated or not. Too many items like that are _supposed_ to be deprecated (with Walter's full agreement) but still persist, but I don't remember if Walter agreed to axe this one or not. I definitely think that it should go though. - Jonathan M Davis
Sep 16 2012