Skip to content

Avoid repeated work for identical parametric contexts in TIv2. #2154

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

copybara-service[bot]
Copy link

Avoid repeated work for identical parametric contexts in TIv2.

Generic utilities may be invoked a large number of times in a target, with parametrics that amount to the same values. In such cases there is no point in having separate caching contexts or repeatedly analyzing the callee function, so this change avoids both of those things. This change also eliminates some unnecessary cache invalidation scenarios.

This cuts 80% of the std.x typechecking time.

Generic utilities may be invoked a large number of times in a target, with parametrics that amount to the same values. In such cases there is no point in having separate caching contexts or repeatedly analyzing the callee function, so this change avoids both of those things. This change also eliminates some unnecessary cache invalidation scenarios.

This cuts 80% of the std.x typechecking time.

PiperOrigin-RevId: 756797095
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.

1 participant