Add SIMD primitive comparison kernels - #9587
Conversation
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Merging this PR will improve performance by 11.66%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | WallTime | words_gather_scalar_avx2[65536] |
9.4 µs | 8.2 µs | +13.48% |
| ⚡ | Simulation | search_index_above_max_chunked |
608.7 µs | 549.4 µs | +10.78% |
| ⚡ | Simulation | search_index_in_range_chunked |
610.1 µs | 550.9 µs | +10.74% |
| 🆕 | WallTime | compare_f32_neon |
N/A | 5.4 µs | N/A |
| 🆕 | WallTime | compare_int_constant_left_neon |
N/A | 4 µs | N/A |
| 🆕 | WallTime | compare_u64_neon |
N/A | 4.6 µs | N/A |
| 🆕 | WallTime | compare_u8_neon |
N/A | 3.8 µs | N/A |
| 🆕 | WallTime | compare_f32_avx2 |
N/A | 3.1 µs | N/A |
| 🆕 | WallTime | compare_int_constant_left_avx2 |
N/A | 3.4 µs | N/A |
| 🆕 | WallTime | compare_u64_avx2 |
N/A | 4 µs | N/A |
| 🆕 | WallTime | compare_u8_avx2 |
N/A | 1.7 µs | N/A |
| 🆕 | WallTime | compare_f32_avx512 |
N/A | 2.6 µs | N/A |
| 🆕 | WallTime | compare_int_constant_left_avx512 |
N/A | 2.6 µs | N/A |
| 🆕 | WallTime | compare_u64_avx512 |
N/A | 3 µs | N/A |
| 🆕 | WallTime | compare_u8_avx512 |
N/A | 1.6 µs | N/A |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing ct/primitive-comparison-simd (3e39406) with develop (e4b3421)
Footnotes
-
54 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Summary
Moves the explicit AVX2 and AVX-512 primitive comparison kernels from #9547 into the handwritten comparison path. This leaves the RowFn work in #9547 and #9548 untouched while preserving the existing portable lane-kernel fallback on non-x86 targets and x86-64 CPUs without AVX2.
Changes
ymmmasks and AVX-512 useszmm/kmasks with direct bitmap stores. This environment cannot provide x86 runtime timings.