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

Reduce function calling overhead by ~25% in ReferencePool::update_counts: #1608

Merged
merged 1 commit into from
May 15, 2021

Commits on May 15, 2021

  1. Reduce function calling overhead by ~25% in ReferencePool::update_cou…

    …nts:
    
    1) Place both increfs and decrefs behind a single mutex, rather than two. Even uncontended mutexes aren't free to acquire.
    2) Keep a dirty tracking bool to avoid acquiring any mutexes at all in the common case of no modifications (because everything happened with the GIL held)
    alex committed May 15, 2021
    Configuration menu
    Copy the full SHA
    56973d7 View commit details
    Browse the repository at this point in the history