Skip to content

perf: vectorize small u8 table take with AVX2 - #9572

Open
joseph-isaacs wants to merge 1 commit into
ji/small-u8-table-take-neonfrom
ji/small-u8-table-take-avx2
Open

perf: vectorize small u8 table take with AVX2#9572
joseph-isaacs wants to merge 1 commit into
ji/small-u8-table-take-neonfrom
ji/small-u8-table-take-avx2

perf: vectorize small u8 table take with AVX2

0129184
Select commit
Loading
Failed to load commit list.
CodSpeed HQ / CodSpeed Performance Analysis succeeded Aug 24, 2026 in 0s

Performance Gate Passed

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚡ 9 improved benchmarks
✅ 1972 untouched benchmarks
🆕 6 new benchmarks
⏩ 54 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation decode_primitives[u8, (2000, 4)] 51.4 µs 41.1 µs +25.06%
Simulation decode_primitives[u8, (2000, 2)] 51.5 µs 41.3 µs +24.82%
Simulation decode_primitives[u8, (2000, 8)] 51.9 µs 41.7 µs +24.39%
Simulation take[small_m/shuffled/primitive/nonnull/chunks=2048/indices=64] 801.9 µs 711.9 µs +12.64%
Simulation decode_primitives[u8, (1000, 8)] 43.5 µs 38.8 µs +12.16%
Simulation decode_primitives[u8, (1000, 4)] 43.7 µs 39 µs +12.12%
Simulation take[small_m/shuffled/primitive/nonnull/chunks=256/indices=64] 611.3 µs 545.4 µs +12.07%
Simulation decode_primitives[u8, (1000, 2)] 44.6 µs 39.8 µs +12.04%
Simulation take[small_m/shuffled/primitive/nonnull/chunks=2048/indices=16] 376.2 µs 338.5 µs +11.16%
🆕 WallTime dict_canonicalize_gt_u8_neon[1000000] N/A 50.4 µs N/A
🆕 WallTime dict_canonicalize_gt_u8_neon[16000000] N/A 778.1 µs N/A
🆕 WallTime dict_canonicalize_gt_u8_avx2[1000000] N/A 56.1 µs N/A
🆕 WallTime dict_canonicalize_gt_u8_avx2[16000000] N/A 1.4 ms N/A
🆕 WallTime dict_canonicalize_gt_u8_avx512[1000000] N/A 53.5 µs N/A
🆕 WallTime dict_canonicalize_gt_u8_avx512[16000000] N/A 1.3 ms 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 ji/small-u8-table-take-avx2 (0129184) with develop (62648ef)2

Open in CodSpeed

Footnotes

  1. 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.

  2. No successful run was found on ji/small-u8-table-take-neon (21fa748) during the generation of this report, so develop (62648ef) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.