-
Notifications
You must be signed in to change notification settings - Fork 11
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
Improve JPEG writing performance #36
Conversation
src/structs/bit_writer.rs
Outdated
@@ -44,8 +43,29 @@ impl BitWriter { | |||
self.current_bit = tmp_current_bit; | |||
} | |||
|
|||
#[inline(never)] |
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.
Please add comments why it should be a separate method, why it's good for perf to have a "cold" method which is almost a duplicate of another method.
src/structs/jpeg_write.rs
Outdated
|
||
if tmp == 0 { | ||
let mut z = 1; | ||
write_coef(huffw, b as i16, 0, dctbl); |
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.
I got lost in this block of changes. Please add some comments.
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.
Please add more comments, especially in places where I left comments.
No description provided.