8000 simplify getPosition by Cyan4973 · Pull Request #1161 · lz4/lz4 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

simplify getPosition #1161

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

Merged
merged 1 commit into from
Sep 13, 2022
Merged

simplify getPosition #1161

merged 1 commit into from
Sep 13, 2022

Conversation

Cyan4973
Copy link
Member
@Cyan4973 Cyan4973 commented Sep 13, 2022

it's only used in byPtr mode.
This makes it possible to remove the base parameter.

Removing the need for base pointer is what will make it possible to remove the last remaining pointer overflow UB warnings. However, previous attempt to completely remove base resulted in substantial speed decrease.

This PR implements a much smaller step in this direction, which is presumed to be performance neutral.
It is, as measured on benchmark. Some compilers will even generate exactly the same binary.

it's only used in byPtr mode.
This removes the need to transfer `base` ptr value.
@Cyan4973 Cyan4973 merged commit 520330e into dev Sep 13, 2022
@Cyan4973 Cyan4973 deleted the byPtr branch September 14, 2022 17:27
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.

1 participant
0