-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add Neon implementation of is_sorted_until
#6018
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
base: main
Are you sure you want to change the base?
Conversation
| if constexpr (_Traits::_Vectorized) { | ||
| const size_t _Total_size_bytes = _Byte_length(_First, _Last); | ||
|
|
||
| const auto _Cmp_gt_wrap = [](const auto _Right, const auto _Left) noexcept { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No change requested: This parameter order does non-Newtonian things to my brain but I suppose it is consistent with the code below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On instruction level, both ISAs have the GT mnemonic and not LT mnemonic.
So on intrinsics level lt is weird, and SSE4,2/AVX2 doesn't even have them (SSE2 does though).
For C++ the default predicate is std::less,
We need to bridge these two somehow. Ideally that this part would stand out.
By putting it into the least comfortable place we ensure it stands out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(See also Pearl River Necklace bridge)
This PR adds a vectorized implementation of
is_sorted_untilusing Neon intrinsics 🚀Performance numbers (speedup figure relative to the existing, non-manually vectorized code - higher is better)