Skip to content

Improving AArch64 Performance with SVE for Decompression Functions - #4715

Open
chiranmoyf wants to merge 1 commit into
meta:devfrom
MonakaResearch:aarch64_asm_dev
Open

chiranmoyf wants to merge 1 commit into
meta:devfrom
MonakaResearch:aarch64_asm_dev

Conversation

@chiranmoyf

@chiranmoyf chiranmoyf commented Jul 28, 2026 •

Copy link
Copy Markdown

Motivation

Decompression on AArch64 (e.g., AWS Graviton3) currently doesn't take advantage of SVE (Scalable Vector Extension) instructions, leaving performance on the table in the Huffman decode and sequence decompression hot paths.

Changes

  • Introduces a DYNAMIC_SVE build macro, auto-enabled for Clang/GCC on aarch64, allowing SVE support to be detected and used at runtime.
  • Adds SVE_TARGET_ATTRIBUTE (target("+sve")) so the compiler can generate SVE-enabled variants of the Huffman fast-decode loops and ZSTD_decompressSequences, alongside the existing default implementations.
  • At decompress time, the SVE variant is selected automatically when supported, falling back to the default path otherwise.

Result

~2–3% faster decompression on Graviton3 (fullbench), with no change to compression speed.
Benchmarked using fullbench.
Instance: m7g.8xlarge (Graviton 3)

# Benchmark Baseline (MB/s) SVE (MB/s) Diff (%)
1 decompress 1216.9 1248.4 +2.59%
3 decompressDCtx 1215.3 1250.0 +2.86%
6 decompressContinue 1217.5 1243.8 +2.16%
9 decompressStream 1218.7 1243.7 +2.05%

Related

#4564

This PR is a joint contribution by:

Abhishek Jain(@abhijain1204fujitsu)
Mohak Goel(@mohakgoel1)

@meta-cla meta-cla Bot added the CLA Signed label Jul 28, 2026
@chiranmoyf chiranmoyf changed the title Assembly implementation of 4X1 & 4X2 Huffman for AArch64 Improving AArch64 Performance with SVE for Decompression Functions Sep 8, 2026
@chiranmoyf

Copy link
Copy Markdown
Author

cc @iksaif @terrelln @Cyan4973 would appreciate your feedback when you get a chance.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant