-
Notifications
You must be signed in to change notification settings - Fork 21.6k
common/bitutil: optimize ORBytes #33332
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: master
Are you sure you want to change the base?
Conversation
|
Something to note: the implementation here was copied from crypto/subtle, and it has some preconditions which are missing here. Importantly, the assembly code assumes the input slices do not have partial overlap. I don't know exactly why this is required, but we need to be careful about using assembly with arbitrary memory, since it can lead to memory corruption issues. |
|
@fjl Let me explain: result in: overlap will cause some corrupt. even in current code base, I don't know, But i think event these assembly pr do not being accept. may be I can send other pr to try to do something about overlap issue. |
|
@fjl here is the ORBytes case with master codebase, same as this pr: |
|
The pr try to keep acting like the not asm version before this pr. |
|
I still think it's bad. At least we should document the requirements more clearly. And possibly there should be checks on it. When using |
Add both doc and check. pleast take a look. |
Uh oh!
There was an error while loading. Please reload this page.