[libstdc++] pdqsort - a faster std::sort

Jonathan Wakely jwakely@redhat.com
Wed Apr 8 10:50:00 GMT 2015


Thanks for chiming in, Chris, I was hoping you'd be able to look into
this proposal.

On 08/04/15 10:35 +0100, Christopher Jefferson wrote:
>* I assume the sort works on move-only types in C++11? (I can see you
>make use of move, but do you require it?).
>  - There was a reason (and I can't remember what it was now!) that we
>used 'iter_swap' rather than 'swap(*a,*b)' on iterators. I think it
>might be required to allow sorting std::vector<bool>? Either way, it
>might be worth trying it.

Using iter_swap() does the "std swap two step" [1] for you, could that
be one reason?

[1] http://ericniebler.com/2014/10/21/customization-point-design-in-c11-and-beyond/



More information about the Libstdc++ mailing list