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

Optimize Build::env_cache: Store Option<Arc<str>> as key #832

Merged
merged 1 commit into from
Jul 21, 2023
Merged

Optimize Build::env_cache: Store Option<Arc<str>> as key #832

merged 1 commit into from
Jul 21, 2023

Conversation

NobodyXu
Copy link
Collaborator

@NobodyXu NobodyXu commented Jul 21, 2023

instead of Option<String> so that getting environment variable from env_cache does not need heap allocation at all.

instead of `Option<String>` so that getting environment variable from
`env_cache` does not need heap allocation at all.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Copy link
Member

@thomcc thomcc left a comment

Choose a reason for hiding this comment

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

Fair enough. These strings are really small though, I don't really think it's worth all the trouble you're going through. That said, it's already done and doesn't make the code much more complex.

@thomcc thomcc merged commit d34e43b into rust-lang:main Jul 21, 2023
16 checks passed
@NobodyXu NobodyXu deleted the optimize/env branch July 21, 2023 04:33
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