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

speed up ReentrantLock by sinking try blocks #32406

Merged
merged 1 commit into from
Jun 26, 2019
Merged

Conversation

JeffBezanson
Copy link
Sponsor Member

try is unfortunately pretty expensive, but common paths in lock acquire and release don't need it, so we can sink it just to the operations that might fail.

@JeffBezanson JeffBezanson added performance Must go faster domain:multithreading Base.Threads and related functionality labels Jun 24, 2019
Copy link
Sponsor Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

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

Good ol' performance hacking :)

@JeffBezanson JeffBezanson merged commit d97d399 into master Jun 26, 2019
@JeffBezanson JeffBezanson deleted the jb/lockspeed branch June 26, 2019 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:multithreading Base.Threads and related functionality performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants