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

feat: add take and into_inner methods to GILOnceCell #3556

Merged
merged 3 commits into from Oct 29, 2023

Conversation

wyfo
Copy link
Contributor

@wyfo wyfo commented Oct 29, 2023

take is used in #3540

Now, GILOnceCell has the same methods as standard OnceLock, but some traits implementation are still missing, like Default.

Copy link
Member

@adamreichold adamreichold left a comment

Choose a reason for hiding this comment

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

One minor comment whether the existing code could be improved.

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 29, 2023

CodSpeed Performance Report

Merging #3556 will improve performances by 22.03%

Comparing wyfo:giloncecell_take (1fd4090) with main (dc251d0)

Summary

⚡ 1 improvements
✅ 77 untouched benchmarks

Benchmarks breakdown

Benchmark main wyfo:giloncecell_take Change
list_via_downcast 153.9 ns 126.1 ns +22.03%

@adamreichold adamreichold added this pull request to the merge queue Oct 29, 2023
Merged via the queue into PyO3:main with commit bb808da Oct 29, 2023
34 of 35 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.

None yet

2 participants