8000 lazily allocate strings when unpacking the autogen cache by froydnj · Pull Request #6533 · sorbet/sorbet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

lazily allocate strings when unpacking the autogen cache #6533

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 1 commit into from
Nov 2, 2022

Conversation

froydnj
Copy link
Contributor
@froydnj froydnj commented Nov 2, 2022

Motivation

There's no reason to allocate a string here; the maps that we're using support heterogeneous lookup, and therefore we can avoid allocating a string for each entry in the cache.

Bonus deletion of a constructor that's unused.

Test plan

See included automated tests.

@froydnj froydnj requested a review from a team as a code owner November 2, 2022 16:30
@froydnj froydnj requested review from jez and removed request for a team November 2, 2022 16:30
@froydnj froydnj merged commit 8311cf7 into master Nov 2, 2022
@froydnj froydnj deleted the froydnj-autogen-cache-reading branch November 2, 2022 17:38
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
0