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

Only check the savings if a word occurs at least twice #6455

Merged
merged 1 commit into from
Jun 3, 2022

Conversation

jepler
Copy link
Member

@jepler jepler commented Jun 2, 2022

Profiling shows that est_net_savings is one of the highest costs of the whole process. Approximately, you can save storage only if a word appears more than once, and doing this greatly reduces the number of est_net_savings calls (this isn't exactly true, because a 'word' could be made only of very infrequent code points, but let's ignore it). In a local build, it reduces the time for this specific build step by 50% on ports/unix VARIANT=coverage build, without affecting the size of the generated binary.

Profiling shows that `est_net_savings` is one of the highest costs of
the whole process. Approximately, you can save storage only if a word
appears more than once, and doing this greatly reduces the number
of `est_net_savings` calls. Locally, it reduces the time for this
specific build step by 50% on ports/unix coverage build, without
affecting the size of the generated binary.
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Thank you!

@tannewt tannewt merged commit 5c97689 into adafruit:main Jun 3, 2022
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