Skip to content

More minmax vectorization #2803

@StephanTLavavej

Description

@StephanTLavavej

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixedSomething works now, yay!performanceMust go faster

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions