huf_decompress: enable 4-way fast loop on riscv64#4622
Open
Polaris-911 wants to merge 1 commit intofacebook:devfrom
Open
huf_decompress: enable 4-way fast loop on riscv64#4622Polaris-911 wants to merge 1 commit intofacebook:devfrom
Polaris-911 wants to merge 1 commit intofacebook:devfrom
Conversation
Contributor
|
Do you have benchmarks for this? |
Contributor
Author
Benchmark Results (silesia.tar, level 1)Hi @terrelln Here are the benchmark results comparing the baseline
Summary: |
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.
Summary
lib/decompress/huf_decompress.c, enableHUF_4X2_4WAYforriscv64(defined(__riscv) && __riscv_xlen == 64).Why this change is reasonable
HUF_4X2_4WAYswitch controls whether the fast loop decodes all 4 streams in the main unrolled body, or uses a 3-way fallback to reduce register pressure.aarch64, which indicates the 4-way variant is considered stable and beneficial on modern 64-bit RISC-style cores with larger register files.riscv64has similar 64-bit execution characteristics for this scalar path (64-bit container ops, stream-parallel decode pattern), so selecting 4-way is a reasonable architecture-level default.riscv64is opted in;rv32and all non-RISC-V targets keep existing behavior.