-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Vectorize equality-comparing algorithms for more types #5527
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
Vectorize equality-comparing algorithms for more types #5527
Conversation
Also drop _Vector_alg_in_find_first_of_is_safe in favor of _Vector_alg_in_search_is_safe
30600f3 to
14706e0
Compare
14706e0 to
ab6be2d
Compare
tests/std/tests/GH_000431_equal_memcmp_is_safe/test.compile.pass.cpp
Outdated
Show resolved
Hide resolved
|
Thanks! 😻 I fixed typos and pushed minor nitpicks. |
equal and ranges::equal using memcmp for more types
|
I've updated the title to a more specific. |
equal and ranges::equal using memcmp for more types
Actually, restored previous title. |
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
|
Thanks for supporting Clang as even more of a first-class citizen than MSVC! 😹 🥇 🎉 |
Towards #5479
Use
__is_trivially_equality_comparablestarting in Clang 19, with escape hatch.Distinguish
memcmpand search-like vector algorithms, as the latter need 1, 2, 4, or 8 element size.If this takes on, may improve
mismatchto vectorize for odd element size too.It takes division, but it can be done in the header, where it will be optimized to big multiplication.
Also can look into
_Vector_alg_in_find_is_safe.I'm not sure though:
operator==pair<int, int>orchrono::duration<uint64_t, pico>will not be automatically engaged