fallible scalar_at and validity#6102
Conversation
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
7192fc7 to
39a8a89
Compare
CodSpeed Performance ReportMerging this PR will degrade performance by 43.08%Comparing
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | WallTime | u64_FoR[10K] |
12 µs | 8.1 µs | +48.38% |
| ⚡ | WallTime | u16_FoR[100K] |
12 µs | 9.8 µs | +22.23% |
| ⚡ | WallTime | u32_FoR[1M] |
11.8 µs | 10.1 µs | +17.08% |
| ❌ | WallTime | u8_FoR[1K] |
9.7 µs | 11.2 µs | -13.45% |
| ❌ | WallTime | u64_FoR[1K] |
6.8 µs | 7.9 µs | -14.31% |
| ⚡ | WallTime | u16_FoR[1M] |
6.9 µs | 6 µs | +15.23% |
| ⚡ | WallTime | u8_FoR[10M] |
7.1 µs | 5.6 µs | +27.09% |
| ❌ | WallTime | u16_FoR[10M] |
6.4 µs | 11.2 µs | -43.08% |
| ❌ | WallTime | u8_FoR[1M] |
5.7 µs | 6.8 µs | -14.95% |
| ❌ | Simulation | bench_compare_primitive[(100000, 128)] |
981.6 µs | 1,092.3 µs | -10.14% |
| ❌ | Simulation | bench_compare_primitive[(100000, 2)] |
977.4 µs | 1,088.3 µs | -10.19% |
| ❌ | Simulation | bench_compare_primitive[(100000, 4)] |
977.6 µs | 1,088.3 µs | -10.17% |
| ❌ | Simulation | bench_compare_primitive[(100000, 32)] |
979.3 µs | 1,089.6 µs | -10.12% |
| ❌ | Simulation | bench_compare_primitive[(100000, 8)] |
978 µs | 1,088.3 µs | -10.13% |
| ❌ | Simulation | bench_compare_varbin[(100000, 128)] |
998 µs | 1,110.2 µs | -10.1% |
| ❌ | Simulation | bench_compare_varbin[(100000, 2)] |
981.9 µs | 1,093.6 µs | -10.21% |
| ❌ | Simulation | bench_compare_varbin[(100000, 32)] |
985.9 µs | 1,097.8 µs | -10.19% |
| ❌ | Simulation | bench_compare_varbin[(100000, 4)] |
982.2 µs | 1,093.5 µs | -10.18% |
| ❌ | Simulation | bench_compare_varbin[(100000, 8)] |
982.7 µs | 1,094.2 µs | -10.19% |
| ❌ | Simulation | bench_compare_varbinview[(100000, 2)] |
982.2 µs | 1,093.6 µs | -10.19% |
| ... | ... | ... | ... | ... | ... |
ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.
Footnotes
-
1254 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. ↩
Benchmarks: Random AccessSummary
|
Benchmarks: FineWeb NVMeSummary
Detailed Results Table
|
Benchmarks: TPC-H SF=1 on NVMESummary
Detailed Results Table
|
Benchmarks: TPC-H SF=1 on S3Summary
Detailed Results Table
|
Benchmarks: TPC-DS SF=1 on NVMESummary
Detailed Results Table
|
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
Benchmarks: TPC-H SF=10 on NVMESummary
Detailed Results Table
|
Benchmarks: FineWeb S3Summary
Detailed Results Table
|
Benchmarks: Statistical and Population GeneticsSummary
Detailed Results Table
|
Benchmarks: TPC-H SF=10 on S3Summary
Detailed Results Table
|
vortex-array/src/array/mod.rs
Outdated
There was a problem hiding this comment.
I think you may have left a lot of these things around. And annoyingly, if we used .expect not .vortex_expect then clippy would have told us.
Benchmarks: Clickbench on NVMESummary
Detailed Results Table
|
Benchmarks: CompressionSummary
Detailed Results Table
|
gatesn
left a comment
There was a problem hiding this comment.
Let's just pause on this one until we know whether optimizer ruels should be fallible. If not, I think Array::filter / Array::slice don't need to be either.
I think it makes sense for optimizer rules to be fallible
This PR makes several validity and scalar-related methods fallible (returning VortexResult<T> instead of T). --- Breaking Changes Validity methods (in vortex-array) ``` ┌──────────────────────────────────────┬─────────┬───────────────────────┐ │ Method │ Before │ After │ ├──────────────────────────────────────┼─────────┼───────────────────────┤ │ is_valid(index) │ -> bool │ -> VortexResult<bool> │ ├──────────────────────────────────────┼─────────┼───────────────────────┤ │ all_valid(len) │ -> bool │ -> VortexResult<bool> │ ├──────────────────────────────────────┼─────────┼───────────────────────┤ │ all_invalid(len) │ -> bool │ -> VortexResult<bool> │ ├──────────────────────────────────────┼─────────┼───────────────────────┤ │ slice(range) │ -> Self │ -> VortexResult<Self> │ ├──────────────────────────────────────┼─────────┼───────────────────────┤ │ patch(len, offset, indices, patches) │ -> Self │ -> VortexResult<Self> │ └──────────────────────────────────────┴─────────┴───────────────────────┘ Array patch methods ┌─────────────────────────┬─────────┬───────────────────────┐ │ Type │ Before │ After │ ├─────────────────────────┼─────────┼───────────────────────┤ │ BoolArray::patch() │ -> Self │ -> VortexResult<Self> │ ├─────────────────────────┼─────────┼───────────────────────┤ │ PrimitiveArray::patch() │ -> Self │ -> VortexResult<Self> │ ├─────────────────────────┼─────────┼───────────────────────┤ │ DecimalArray::patch() │ -> Self │ -> VortexResult<Self> │ ``` --------- Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
This PR makes several validity and scalar-related methods fallible (returning VortexResult instead of T).
Breaking Changes
Validity methods (in vortex-array)