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

Add cache to OptionKey #14250

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bruchar1
Copy link
Member

OptionKey objects are used extensively. We want them with a simple API, but they also need to be optimized to not compromise meson performances.

Since this is an immutable object, it is possible to cache the OptionKey object creation. We need to do it using the new to make the caching mechanism transparent.

@bruchar1 bruchar1 requested a review from jpakkane as a code owner February 13, 2025 13:05
@bruchar1 bruchar1 force-pushed the cached-optionkey branch 3 times, most recently from f52d09e to 9fdbd2b Compare February 13, 2025 14:54
@bonzini bonzini added this to the 1.8 milestone Feb 13, 2025
OptionKey objects are used extensively. We want them with a simple API,
but they also need to be optimized to not compromise meson performances.

Since this is an immutable object, it is possible to cache the
OptionKey object creation. We need to do it using the __new__
to make the caching mechanism transparent.
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