Project: better partition
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Tue May 17 10:31:47 PDT 2016
We should take advantage of the improved partition code I discussed at
ACCU. Also there's a person on
https://www.reddit.com/r/programming/comments/4jlkhv/accu_2016_keynote_by_andrei_alexandrescu/
discussing a simpler algorithm based on a couple of additional
assumptions. The plan would go:
* Add a new public overload of partition()
(https://dlang.org/phobos/std_algorithm_sorting.html#partition) that
takes an index as a second argument. Implement partition with pivot per
the slides.
* Use it in sort
* Benchmark, make sure it's faster.
* Yay.
Andrei
More information about the Digitalmars-d
mailing list