Skip to content

feat: simd128 support for wasm32#706

Open
mertalev wants to merge 16 commits into
libjxl:mainfrom
mertalev:feat/wasm-simd128
Open

feat: simd128 support for wasm32#706
mertalev wants to merge 16 commits into
libjxl:mainfrom
mertalev:feat/wasm-simd128

Conversation

@mertalev
Copy link
Copy Markdown
Contributor

@mertalev mertalev commented Mar 14, 2026

Description

This PR adds simd128 support for jxl-rs when targeting wasm32. It does not include lcms2 integration for Wasm since this requires build toolchain changes and increases the scope of the PR.

In a local benchmark on an M4 Max, performance increased by 2.49x (8.9 to 22.1 MP/s), 2.02x (11.1 to 22.5 MP/s) and 1.35x (34.5 to 46.6 MP/s), respectively, for the progressive.jxl, bike.jxl and cafe.jxl test images.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 14, 2026

Benchmark @ da909d2

MULTI-FILE BENCHMARK RESULTS (8 files)
  CPU architecture: x86_64
  WARNING: System appears noisy: high system load (2.18). Results may be unreliable.
Statistics:
  Confidence:               99.0%
  Max relative error:        3.0%

Comparing: 7cf3a662 (Base) vs 86f9c2dd (PR)

File Base (MP/s) PR (MP/s) Δ%
bicycles.jxl 7.984 7.971 -0.15% ±0.7%
bike.jxl 24.613 24.309 -1.23% ±2.4%
delta_palette.jxl 6.683 6.682 -0.01% ±0.4%
green_queen_modular_e3.jxl 8.768 8.728 -0.45% ±0.6%
green_queen_vardct_e3.jxl 23.453 23.389 -0.27% ±3.0%
lz77_flower.jxl 3.655 3.660 +0.14% ±1.1%
patches_lossless.jxl 2.880 2.872 -0.30% ±1.9%
sunset_logo.jxl 3.093 3.099 +0.19% ±1.1%

Comment thread jxl_simd/src/wasm32/mod.rs
Comment thread jxl_simd/src/wasm32/simd128.rs Outdated
Comment thread .github/workflows/pull_request.yml Outdated
Comment thread jxl_simd/src/wasm32/simd128.rs Outdated
@mertalev mertalev force-pushed the feat/wasm-simd128 branch from eddc788 to cc9246d Compare March 18, 2026 16:33
Comment thread .cargo/config.toml
Comment thread jxl_simd/src/wasm32/simd128.rs Outdated
@veluca93 veluca93 force-pushed the feat/wasm-simd128 branch from cd125ca to da909d2 Compare April 4, 2026 22:02
@veluca93 veluca93 enabled auto-merge (squash) April 4, 2026 22:15
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.

2 participants