Repository navigation
Rotate by scalar shift counts in in_out_mapper_simd - #4
Merged
Merged
Conversation
Large perf gain under wasm32, smaller on arm64, identical codegen on amd64.
Contributor
Ah; IIRC I hoisted it as a constant to (slightly, probably) improve codegen/performance on x86-64 for for, but if shifting by a constant is better everywhere else, let's revert that. |
Contributor
Author
|
Okok, do check it doesn't regress x86 on your machine. On Zen 3 it doesn't |
Contributor
|
Seems to be perf-neutral, at least in an isolated seq-hash only benchmark 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wasm32 has no per lane shift count instruction so wide makes this scalar on wasm, apparently. Using a constant shift improves perf on wasm a lot but also significantly on arm64, with much reduced instruction count. Identical codegen for me on x86-64-v3. Is a constant shift safe here? Looks like it?