Conversation
Merging this PR will regress 1 benchmark
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | words_gather_scalar_avx2[65536] |
8.2 µs | 9.4 µs | -12.05% |
| ⚡ | Simulation | allocate_drop_vortex_minimal_alignment[0] |
1,077.2 ns | 968.9 ns | +11.18% |
| ⚡ | Simulation | allocate_drop_vortex[0] |
1.1 µs | 1 µs | +10.57% |
| ⚡ | Simulation | allocate_drop_bytes[0] |
581.3 ns | 527.2 ns | +10.27% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing mk/scheme-replaces (460e49c) with develop (022c604)
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. ↩
2bdbedd to
c99d27a
Compare
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
c99d27a to
460e49c
Compare
| fn replaces(&self) -> Vec<SchemeId> { | ||
| vec![] | ||
| } |
There was a problem hiding this comment.
talking about this offline, but I feel that this needs to exist only on the default compressor vortex-btrblocks, rather than down here
Summary
An encoding with two wire formats needs two compression behaviors.
For example, we should be able to compress wide decimals into lower parts only when the writer may emit
vortex.decimal_byte_parts.v2. Otherwise we must keep producing single-part arrays undervortex.decimal_byte_parts. These will become two separate schemes: the originalDecimalSchemeand newWideDecimalScheme(name tbd). Notably, the latter will still be able to producevortex.decimal_partsfor narrow decimals.However, this means that if the edition with
vortex.decimal_byte_parts.v2is enabled, both decimal schemes will be enabled (since editions are additive,vortex.decimal_byte_partsis also enabled). They should be mutually exclusive (otherwise they compete), and there should be some way to express that a scheme supersedes another.This PR adds that relation. A scheme declares which schemes it replaces. When both are given to the compressor, the replaced one is dropped. When the newer one is not permitted by the writer's editions, it never reaches the compressor and the older one compresses as before.
Design
Scheme::replacesreturns the scheme IDs this scheme supersedes. It defaults to empty.CascadingCompressor::newdrops every given scheme that another given scheme replaces. Replacement lists of dropped schemes still apply, so versions chain transitively. Registration order is preserved.BtrBlocksCompressorBuilder::retain_allowed_encodingsis unchanged. It drops schemes whose produced IDs are not all permitted, before construction, so a newer version the writer may not emit never reachesnewand the version it replaces stays.API Changes
New:
Scheme::replacesandCascadingCompressor::schemes.