mapleFU commented on PR #55449: URL: https://github.com/apache/arrow/pull/55449#issuecomment-7134660150
I applied this PR on top of `main` (with #55714) and benchmarked it on **Apple M5 Max (arm64, Apple clang 21.0.0, Release build)**. Hoisting the multipliers in `AlpInlines<T>::GetMultipliers()` unblocks Clang auto-vectorization on AArch64 for all three `Decompress` instantiations (`float -> float`, `float -> double`, `double -> double`), giving a **1.7x–3.9x** decode speedup across both constant and varied inputs: | Benchmark (`N = 65536`) | `main` | This PR | Speedup | | :--- | ---: | ---: | ---: | | `BM_AlpDecodingFloat` (constant) | 7.10 GiB/s | 27.96 GiB/s | 3.94x | | `BM_AlpDecodingDouble` (constant) | 13.20 GiB/s | 31.24 GiB/s | 2.37x | | `BM_AlpDecodingVaried<FloatType>` (`exception-percent:0`) | 6.89 GiB/s | 22.12 GiB/s | 3.21x | | `BM_AlpDecodingVaried<FloatType>` (`exception-percent:1`) | 6.62 GiB/s | 17.40 GiB/s | 2.63x | | `BM_AlpDecodingVaried<FloatType>` (`exception-percent:10`) | 6.02 GiB/s | 13.23 GiB/s | 2.20x | | `BM_AlpDecodingVaried<DoubleType>` (`exception-percent:0`) | 13.17 GiB/s | 25.68 GiB/s | 1.95x | | `BM_AlpDecodingVaried<DoubleType>` (`exception-percent:1`) | 13.06 GiB/s | 25.19 GiB/s | 1.93x | | `BM_AlpDecodingVaried<DoubleType>` (`exception-percent:10`) | 11.58 GiB/s | 19.52 GiB/s | 1.69x | | `BM_AlpEncodingVaried<FloatType>` (`exception-percent:0`) | 956 MiB/s | 967 MiB/s | 1.01x | | `BM_AlpEncodingVaried<FloatType>` (`exception-percent:10`) | 717 MiB/s | 747 MiB/s | 1.04x | | `BM_AlpEncodingVaried<DoubleType>` (`exception-percent:0`) | 1.14 GiB/s | 1.17 GiB/s | 1.03x | | `BM_AlpEncodingVaried<DoubleType>` (`exception-percent:10`) | 1.21 GiB/s | 1.19 GiB/s | 0.99x | -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
