Skip to content

Request evaluator split caching #75015

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

Merged
merged 12 commits into from
Jul 7, 2024
Merged

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Jul 7, 2024

This PR introduces a third caching mode for requests. This optimizes the case where most of the time, the result of the request is some “empty” value. The empty value is encoded with a bit in the AST node itself, while a non-empty value is stored in the request evaluator cache.

By converting the top 10 requests to use split caching, this reduces the request evaluator cache size by ~50% while building the stdlib.

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov slavapestov marked this pull request as ready for review July 7, 2024 14:33
@slavapestov slavapestov merged commit bd2fcf3 into swiftlang:main Jul 7, 2024
5 checks passed
Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

This is a great little optimization, thank you!

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