image-rs / jpeg-decoder

JPEG decoder written in Rust
Apache License 2.0
149 stars 87 forks source link

Use NEON instructions on aarch64. #221

Closed veluca93 closed 2 years ago

veluca93 commented 2 years ago

The code is a direct translation of the sse3 code for x86, and provides approximately a 0.67x decrease of image decoding time on a Samsung A51.

Fixes #202, or at least improves the situation.

decode a 2268x1512 JPEG time:   [83.619 ms 85.692 ms 87.848 ms]

decode a 2268x1512 JPEG time:   [56.209 ms 57.019 ms 57.876 ms]
                        change: [-35.318% -33.460% -31.535%] (p = 0.00 < 0.05)
veluca93 commented 2 years ago

Should we add a CI run on a emulated aarch64? If so, in this PR or in another?

HeroicKatora commented 2 years ago

If we can, that'd be perfect. It can be another PR though I'd prefer adding it before this one then.

veluca93 commented 2 years ago

If we can, that'd be perfect. It can be another PR though I'd prefer adding it before this one then.

Done and new feature added to the CI.