Repository navigation
Blocked FoR: store a global reference scalar as metadata rather than child - #10222
Conversation
99a8071 to
854f1a1
Compare
Merging this PR will degrade performance by 31.27%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | filter_neon[8] |
1.1 µs | 2.3 µs | -53.12% |
| ❌ | Simulation | density_sweep_dense_runs[0.001] |
28.7 µs | 46.5 µs | -38.3% |
| ❌ | WallTime | threshold_neon[8] |
2.8 µs | 4.4 µs | -37.04% |
| ❌ | WallTime | filter_neon[80] |
2.9 µs | 4.1 µs | -28.7% |
| ❌ | WallTime | filter_neon[64] |
2.8 µs | 3.9 µs | -27.03% |
| ❌ | WallTime | threshold_neon[64] |
4.2 µs | 5.6 µs | -25.19% |
| ❌ | WallTime | threshold_neon[80] |
4.6 µs | 5.7 µs | -20.39% |
| ❌ | WallTime | decode_chunked_neon[i64, 524288] |
13.1 µs | 14.9 µs | -11.76% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing mk/for-global-reference (28f7192) with develop (b085f29)
Footnotes
-
12 benchmarks were run, but are now archived. If they were deleted in another branch, consider rebasing to remove them from the report. Instead if they were added back, click here to restore them. ↩
FoR reference as metadataFoR: store a global reference as metadata
FoR: store a global reference as metadataFoR: store a global reference scalar as metadata rather than child
| global_reference: Option<&Scalar>, | ||
| blocked_references: Option<&ArrayRef>, |
| .vortex_expect("for_new") | ||
| .into_array(), |
There was a problem hiding this comment.
better error message
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
d80d13f to
9597f63
Compare
Summary
A FoR array now has either a global reference, stored as a
ScalarinFoRData, or blocked references, one per 1024-element chunk, stored in an optionalblocked_referenceschild. Previously, a single reference was aConstantArraychild, andconstant_reference()recovered it by downcasting that child.With the reference as metadata, nothing can turn a single-reference array into a different encoding by rewriting its child: casts, optimizer rewrites and compressor passes no longer see a child to rewrite. Kernels read the reference directly instead of downcasting and cloning, and no
ConstantArrayis allocated for slice, take, filter ortry_new.API
FoRData { offset, global_reference: Option<Scalar> }. The references slot is renamed toblocked_references: Option<ArrayRef>.references()returns the newFoRReferencesenum, which replacesconstant_reference():validaterequires exactly one of the two, andoffset == 0with a global reference.FoR::try_new(encoded, reference)builds a global reference.FoR::try_new_chunked(encoded, references, offset)builds blocked references, except that aConstantArrayof references becomes a global reference.FoR::encode_chunkedemits a global reference when every chunk has the same minimum. Previously those references stayed aPrimitiveArray, unless the compressor's constant detection, which only keeps a constant when it is smaller, happened to convert them.