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

More minmax vectorization #2803

Open
2 of 3 tasks
StephanTLavavej opened this issue Jun 18, 2022 · 1 comment · May be fixed by #4659
Open
2 of 3 tasks

More minmax vectorization #2803

StephanTLavavej opened this issue Jun 18, 2022 · 1 comment · May be fixed by #4659
Labels
performance Must go faster

Comments

@StephanTLavavej
Copy link
Member

StephanTLavavej commented Jun 18, 2022

Followup issue after merging #2447.

  • Vectorize ranges::min_element, ranges::max_element, ranges::minmax_element
    • This should be similar to vectorizing ranges::count, as we should be able to call the same vector_algorithms.cpp functions after dealing with the iterator/sentinel. (Unlike ranges::find, we don't need to worry about unbounded ranges.)

And as @AlexGuteniev explained, we can go even further:

  • Vectorize ranges::min, ranges::max, ranges::minmax
    • These algorithms return values instead of iterators, so they can be simpler and faster, and "will consist only of vertical max and one reduction".
  • Use AVX2.

#2439 tracks extending the optimization to floating-point types.

@AlexGuteniev

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Must go faster
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants