<algorithm>: Shuffle algorithms can save registers
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 1.7k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 22
Description
This is a replayed old report VSO-278082 from @CaseyCarter that came up last time we touched std::shuffle to fix an integer overflow bug. Internally we had marked it 'vNext' because it would change the shuffle order which we considered 'quasi-ABI', but https://github.com/microsoft/STL/issues/178 suggests that we are willing to make changes to the output of distributions.
The original report:

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the original report image and the std::shuffle implementation, then read the distribution-output compatibility discussion in issue 178. The issue does not name files, tests, or a precise acceptance criterion; done would require identifying and validating a register-saving change without an unacceptable shuffle-order compatibility impact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100