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

write/line: avoid division if minimum instruction length is 1 #476

Merged
merged 1 commit into from
Mar 28, 2020

Conversation

philipc
Copy link
Collaborator

@philipc philipc commented Mar 27, 2020

Fixes #468

I haven't done any performance measurements, but a similar change was significant when reading.
cc @bjorn3

@philipc philipc requested a review from fitzgen March 27, 2020 03:56
@coveralls
Copy link

coveralls commented Mar 27, 2020

Coverage Status

Coverage decreased (-0.02%) to 85.472% when pulling 573918d on philipc:issue-468 into 15bea8e on gimli-rs:master.

@bjorn3
Copy link
Contributor

bjorn3 commented Mar 27, 2020

This reduces the time of LineProgram::generate_row into which op_advance is inlined from 0.55% (0.44% self) to 0.24% (0.13% self) when generating the debuginfo for the image crate. For comparison the total amount of time spent on debuginfo generation for that crate with this patch is 1.46% of the total compilation time.

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

Nice!

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.

[LineProgram] Don't make LineEncoding configurable
4 participants