-
-
Notifications
You must be signed in to change notification settings - Fork 29
Optimize out some read operations from the quick deflate algorithm #374
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
Conversation
|
Before and after: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
This is an idea I've been thinking about for a while. It's possible, but complicated, to do this with the higher compression levels, so I started with the simpler |
folkertdev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, that's awesome. Left a comment below to mitigate the effects on other compression levels (they all use the same hashing function, so it's a good idea to check them too)
| Self::quick_insert_value(state, string, val) | ||
| } | ||
|
|
||
| pub fn quick_insert_value(state: &mut State, string: usize, val: u32) -> u16 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for me, this needs an #[inline], otherwise level 2 regresses by a couple of percent. Interestingly I then see some improvements for the other compression levels too (mostly in instructions), maybe because different (better) inlining decisions are made.
|
With the |
folkertdev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great work, thanks!
No description provided.