[patch, libstdc++] std::shuffle: Generate two swap positions at a time if possible
Eelis
eelis@eelis.net
Wed May 25 17:13:00 GMT 2016
>>> On 2016-05-01 16:18, Eelis wrote:
>>>> The attached patch optimizes std::shuffle for the very common case
>>>> where the generator range is large enough that a single invocation
>>>> can produce two swap positions.
>>>>
>>>> This reduces the runtime of the following testcase by 37% on my machine:
Gentle ping. :) Did anyone get a chance to take a look at this?
Does the idea seem sound? Does the implementation seem correct?
Thanks,
Eelis
More information about the Libstdc++
mailing list