Skip to content

More minmax vectorization #2803

Description

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 Alex Guteniev (@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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixedSomething works now, yay!performanceMust go faster

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions