Use cursor copies for PiecewiseSequence slices#8832
Conversation
Merging this PR will regress 1 benchmark
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
9adf56d to
c4a0358
Compare
f9a3472 to
afcc04a
Compare
c4a0358 to
c76531d
Compare
80f7b89 to
30870aa
Compare
30870aa to
e777ab4
Compare
afcc04a to
1a17030
Compare
5924fe3 to
79d9e10
Compare
Signed-off-by: Daniel King <dan@spiraldb.com>
1a17030 to
534b70f
Compare
| let start = start.as_(); | ||
| let length = length.as_(); | ||
| result.extend_from_slice(&values[start..][..length]); | ||
| cursor = copy_slice_to_spare(&mut result, cursor, &values[start..][..length], output_len)?; |
There was a problem hiding this comment.
I would benchmark having *mut T that you keep advancing for every value written so you always hold the next empty slot in that pointer. That's what we do for buffer extend
Summary
extend_from_slicein the primitive, decimal, VarBinView, and VarBin PiecewiseSequence consumersset_lenValidation
cargo +nightly fmt --allcargo clippy -p vortex-array --all-targets --all-features -- -D warningscargo bench -p vortex-array --bench listview_rebuildcargo bench -p vortex-array --bench cast_decimalcargo test -p vortex-array piecewise_sequence