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

Optimize _Non_propagating_cache #2118

Merged

Conversation

AdamBucior
Copy link
Contributor

Adds a specialization of _Non_propagating_cache for trivially destructible types. Also adds a way to disable it for compatibility with #2042.

@AdamBucior AdamBucior requested a review from a team as a code owner August 12, 2021 18:11
stl/inc/ranges Outdated Show resolved Hide resolved
stl/inc/ranges Show resolved Hide resolved
stl/inc/ranges Show resolved Hide resolved
@StephanTLavavej StephanTLavavej added the performance Must go faster label Aug 13, 2021
@StephanTLavavej StephanTLavavej added the ranges C++20/23 ranges label Aug 14, 2021
Comment on lines +773 to +777
private:
union {
_Ty _Val;
};
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This affects ABI by omitting bool _Engaged = false; (and _Non_propagating_cache is a data member of _Join_view_base). That's acceptable because <ranges> is ABI-unlocked, but we'll need to be certain to port all <ranges> changes to 16.11.

stl/inc/ranges Show resolved Hide resolved
stl/inc/ranges Show resolved Hide resolved
stl/inc/ranges Outdated Show resolved Hide resolved
@CaseyCarter CaseyCarter removed their assignment Aug 19, 2021
@StephanTLavavej StephanTLavavej self-assigned this Aug 26, 2021
@StephanTLavavej
Copy link
Member

I'm mirroring this to an MSVC-internal PR. Please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 0f8ec3a into microsoft:main Aug 27, 2021
@StephanTLavavej
Copy link
Member

Thanks for improving the performance here before the ABI lockdown! 🚀 🔐 😸

@AdamBucior AdamBucior deleted the non-propagating-cache-optimization branch August 27, 2021 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Must go faster ranges C++20/23 ranges
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants