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

Performance improvement #216

Merged
merged 1 commit into from
Aug 24, 2024
Merged

Performance improvement #216

merged 1 commit into from
Aug 24, 2024

Conversation

BrianWeed
Copy link
Contributor

By-value sink params can be moved into their final destination

By-value sink params can be moved into their final destination
@jzmaddock
Copy link
Collaborator

Given the nature of shared_ptr, I'm not sure this really gains much if at all?

@BrianWeed
Copy link
Contributor Author

Making a copy of a shared_ptr increases (and then decreases at destruction) an atomic reference counter. These atomic operations are thread fences. Thread fences cause the optimizing compiler to reset, which causes performance issues.

@jzmaddock jzmaddock merged commit bd821cd into boostorg:develop Aug 24, 2024
36 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants