Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<xutility>: Investigate precomposed unwrapped range access CPOs #898

Closed
CaseyCarter opened this issue Jun 15, 2020 · 0 comments · Fixed by #901
Closed

<xutility>: Investigate precomposed unwrapped range access CPOs #898

CaseyCarter opened this issue Jun 15, 2020 · 0 comments · Fixed by #901
Labels
enhancement Something can be improved fixed Something works now, yay!

Comments

@CaseyCarter
Copy link
Member

There are a great many occurrences of _Get_unwrapped(_RANGES begin(some_range)) and _Get_unwrapped(_RANGES end(some_range)) in the Ranges algorithms. We should consider providing precomposed "begin-and-unwrap" and "end-and-unwrap" (_Begin_unwrapped and _End_unwrapped?) CPOs (1) to improve readability, and (2) to possibly improve throughput by calling _Unchecked_begin and _Unchecked_end members on ranges that implement them to get an unwrapped iterator directly.

CaseyCarter added a commit to CaseyCarter/STL that referenced this issue Jun 16, 2020
...which call `_Unchecked_begin` and `_Unchecked_end` when present, and fall back to `_Get_unwrapped(begin(...))` (resp. `_Get_unwrapped(end(....))`) otherwise.

Fixes microsoft#898.
CaseyCarter added a commit to CaseyCarter/STL that referenced this issue Jun 16, 2020
...which call `_Unchecked_begin` and `_Unchecked_end` when present, and fall back to `_Get_unwrapped(begin(...))` (resp. `_Get_unwrapped(end(....))`) otherwise.

Fixes microsoft#898.
@CaseyCarter CaseyCarter added enhancement Something can be improved and removed throughput Must compile faster labels Jun 16, 2020
@StephanTLavavej StephanTLavavej added fixed Something works now, yay! and removed work in progress labels Jun 20, 2020
ahanamuk pushed a commit to ahanamuk/STL that referenced this issue Jun 25, 2020
ahanamuk pushed a commit to ahanamuk/STL that referenced this issue Jun 26, 2020
ahanamuk pushed a commit to ahanamuk/STL that referenced this issue Jun 29, 2020
ahanamuk pushed a commit to ahanamuk/STL that referenced this issue Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something can be improved fixed Something works now, yay!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants