-
Notifications
You must be signed in to change notification settings - Fork 22
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
struct LossLess
: Make Rav1dFrameHeader_segmentation::lossless
a bit array
#1231
base: main
Are you sure you want to change the base?
Conversation
42b9e02
to
8ada302
Compare
9973a68
to
f9b1f96
Compare
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.
If I'm understanding this correctly, it seems like the main optimization here is using a bitmask operations (LossLess::get
) over an array index operation. It's not clear to me that this would necessarily be more efficient though. Have you profiled this and observed a clear performance improvement?
No, I didn't profile this one individually yet. It does remove the bounds checks, though I guess that's also solved by |
Given that you have other changes that target bounds checks for the |
f9b1f96
to
2720efd
Compare
It's not just about less overall memory, for which memory reductions would be quite small, but about what could be cached. @fbossen, what do you think? |
…ate and access it through this `fn`.
…lass` to avoid an `.unwrap()`. This optimizes it enough to have it be inlined.
…flows on multiplication) and pre-slice `levels`.
This moves the first `mag` initialization to inside the `match`, since LLVM fails to optimize out the bounds checks if an identical `match` is done before the `mag` initialization.
…mized as much as possible.
2720efd
to
8db6ed1
Compare
I've run a bunch of tests and it seems this PR leads to a small performance regression. The potential memory saving here is too small to have a positive impact. |
fn decode_coefs
is slow #1180.I'm working on trying to fix #1180; this is one of a bunch of steps.