-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[LZ4] Branch on token instead of length #1611
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
base: dev
Are you sure you want to change the base?
Conversation
Changing the check: length == RUN_MASK by token >= (RUN_MASK << ML_BITS) This allows the branch to be evaluated without needing to compute length = token >> ML_BITS;
I understand the proposed logic, and why it seems in theory a small advantage. Here is what I get by comparing
It's a lot of traces, and it's a bit confusing because the impact goes in all directions. Here is a (rough) summary:
"Average" seems slightly negative, but given the level of noise, I wouldn't buy too much into that. A nice secondary observation is that |
Changing the check:
length == RUN_MASK
by
token >= (RUN_MASK << ML_BITS)
This allows the branch to be evaluated without needing to compute
length = token >> ML_BITS;