Skip to content

optimize `take_scalar`

5783a6b
Select commit
Loading
Failed to load commit list.
Merged

Perf: optimize take_scalar #5723

optimize `take_scalar`
5783a6b
Select commit
Loading
Failed to load commit list.
CodSpeed HQ / CodSpeed Performance Analysis succeeded Dec 13, 2025 in 0s

Performance Gate Passed

Summary

⚡ 29 improvements
✅ 1227 untouched
⏩ 621 skipped1

Benchmarks breakdown

Benchmark BASE HEAD Change
decode_primitives[u8, (10000, 32)] 73.4 µs 63.5 µs +15.56%
decode_primitives[u8, (10000, 2)] 73.3 µs 63.5 µs +15.58%
decode_primitives[u8, (10000, 128)] 73.4 µs 63.6 µs +15.55%
decode_primitives[u8, (10000, 512)] 73.4 µs 63.5 µs +15.63%
decode_primitives[u8, (10000, 4)] 73.5 µs 63.6 µs +15.54%
decode_primitives[u8, (10000, 8)] 73.5 µs 63.6 µs +15.55%
pvector_take_uniform[16, 10000] 80 µs 70.5 µs +13.55%
pvector_take_uniform[2048, 10000] 84.6 µs 74.8 µs +13.1%
pvector_take_uniform[16, 100000] 758.8 µs 674.3 µs +12.53%
pvector_take_uniform[2048, 1000] 16.3 µs 14.3 µs +14.34%
pvector_take_uniform[2048, 100000] 763.2 µs 678 µs +12.56%
pvector_take_uniform[8192, 10000] 97.4 µs 87.8 µs +10.87%
pvector_take_uniform[16, 1000] 13.1 µs 11.1 µs +18.25%
pvector_take_zipfian[16, 100000] 758.8 µs 674.3 µs +12.53%
pvector_take_zipfian[256, 10000] 80.7 µs 71.2 µs +13.33%
pvector_take_uniform[256, 100000] 759.3 µs 674.8 µs +12.53%
pvector_take_uniform[256, 10000] 80.8 µs 71.2 µs +13.36%
pvector_take_zipfian[16, 1000] 12.3 µs 10.3 µs +19.22%
pvector_take_zipfian[8192, 100000] 785.2 µs 700.6 µs +12.08%
pvector_take_zipfian[16, 10000] 80.3 µs 70.8 µs +13.42%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Footnotes

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