Skip to content

minmax 8 and 16 bit elements are not vectorized #4660

Description

Oversight in initial implementation in #4384. Noticed while benchmarking #4659

Might be superseded by #4453.

The optimization is performed in _Minmax_fwd_unchecked. We don't pick this branch for smaller elements, because _Prefer_iterator_copies evaluates to false.

STL/stl/inc/algorithm

Lines 10417 to 10420 in 8dc4faa

if constexpr (forward_range<_Rng> && _Prefer_iterator_copies<iterator_t<_Rng>>) {
return _Minmax_fwd_unchecked(
_STD move(_UFirst), _STD move(_ULast), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj));
} else {

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 fasterrangesC++20/23 ranges

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions