-
Notifications
You must be signed in to change notification settings - Fork 606
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
Use std::atomic in shared data header #1584
Conversation
5eb49e1
to
da182e0
Compare
⚪ |
⚪ |
da182e0
to
f6af0cd
Compare
⚪
|
⚪
|
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.
Now copying of TSharedData
works the same time as std::shared_ptr<TString>
:
-------------------------------------------------------------|-------------
Benchmark Before | After
-------------------------------------------------------------|-------------
TPartIndexSeekFixture/PassIndexPage/0/0 0.018 us | 0.013 us
TPartIndexSeekFixture/PassIndexPage/1/0 0.013 us | 0.013 us
Full benchmarks results https://gist.github.com/kunga/02e7e9db74b09801774010cdc0cf1e2b
Changelog entry
Use std::atomic in shared data header
Changelog category
Additional information
This should fix performance issues where TSharedData is more expensive to copy than std::shared_ptr.