Skip to content
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

[libc++] Consider using std::find_if in std::copy_if to figure out where to start copying from #129313

Open
ldionne opened this issue Feb 28, 2025 · 0 comments
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. performance

Comments

@ldionne
Copy link
Member

ldionne commented Feb 28, 2025

If std::find_if is fast, this can be beneficial.

We can also potentially find the end of the range to copy using another call to std::find_if. This is probably not worth it unless we have some knowledge of the predicate and iterator cost, but if we did that on random access iterators, we could call memcpy between the two found positions.

@ldionne ldionne added libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. performance labels Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. performance
Projects
None yet
Development

No branches or pull requests

1 participant