Conversation
DecimalByteParts
Merging this PR will regress 1 benchmark
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | decompress[u64, (4000, 1024)] |
71.7 µs | 87.6 µs | -18.14% |
| ⚡ | WallTime | arrow_checked_add_u32_neon[16384] |
20.3 µs | 12.9 µs | +57.95% |
| ⚡ | Simulation | take_filter_list_slice_mask_sequential_indices[768, 50] |
184 µs | 141.8 µs | +29.78% |
| ⚡ | Simulation | take_filter_list_slice_mask_sequential_indices[256, 50] |
185.4 µs | 143.3 µs | +29.32% |
| ⚡ | Simulation | compact[(1024, 90)] |
1.4 µs | 1.3 µs | +12.98% |
| ⚡ | Simulation | compact[(2048, 90)] |
1.5 µs | 1.3 µs | +12.4% |
| ⚡ | Simulation | allocate_drop_arrow[0] |
516.4 ns | 462.3 ns | +11.72% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing mk/dbp-v2 (78415c2) with mk/edition-aware-schemes (97cbf22)2
Footnotes
-
218 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. ↩
-
No successful run was found on
mk/edition-aware-schemes(d3526b5) during the generation of this report, so 7a50318 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
DecimalBytePartsDecimalByteParts
DecimalBytePartsDecimalByteParts and guarantee compat with editions
35300e3 to
c48b00b
Compare
3d1237a to
fc7f432
Compare
DecimalByteParts and guarantee compat with editions416873c to
2c4016d
Compare
…2 format Signed-off-by: Matt Katz <mhkatz97@gmail.com>
Summary
Compress wide decimals into lower parts when the writer may emit
vortex.decimal_byte_parts.v2. Under every current edition nothing changes, since none permits that format yet.This is the last layer of the stack: #9834 (the array and its two wire formats) → #9928 (the compressor hands schemes the writer's permitted serialized IDs) → this PR.
Changes
DecimalSchemestays one scheme. It declaresvortex.decimal_byte_partsas the format it always writes, since values that fit one signed part always serialize that way. Incompressit narrows the decimal, splits it withsplit_decimal, and checks one thing before going further: if the split produced lower parts and the compression context does not permit the v2 format, the wide values are left canonical. Otherwise the most significant part and each lower part are compressed as children and assembled into aDecimalBytePartsArray.The scheme now declares four children, the MSP plus up to three lower parts, so child indices are stable across both paths.
MAX_LOWER_PARTSbecomes public for that.Behavior
Golden and trace snapshots are unchanged. A narrow decimal follows exactly the path it did before, since splitting a value that fits one part reuses its buffer as the MSP.
Testing
i128andi256inputs, nullable and not, split into one and three lower parts when v2 is permitted, and stay canonical when it is not. Narrow values never get lower parts and keep the frozen format under either mode. Extremei256values round-trip. Canonicalizing compressed output keeps the storage width. The scheme is present exactly when the frozen format is permitted, whatever the v2 setting.i128and nullablei256columns round-trips through a file when the session permits both formats. Under the core edition a pre-split input comes back canonical, and with v2 permitted its lower parts survive.Follow-ups
vortex.decimal_byte_parts.v2.